$.extend()

Syntax

$.extend([recursive, ][target, ]properties [, propertiesN])

Parameters

recursive (optional)
A Boolean indicating whether to merge objects within objects
target (optional)
An object that will receive the new properties
properties
An object containing additional properties to merge in
propertiesN
Additional objects containing properties to merge in

Return value

The target object after it has been modified.

Description

Merge the contents of two objects together into the first object.


var t1 = {
 a: 0,
 b: {x: 5, y: 100},
 c: 7
};

var t2 = {
 b: {p: 2},
 d: 1
};
var object = $.extend(t1, t2);
Home 
  JavaScript Book 
    jQuery  

Effect:
  1. jQuery Effect
  2. .animate()
  3. .css() does animation
  4. .clearQueue()
  5. .delay()
  6. .dequeue()
  7. $.extend()
  8. .fadeIn()
  9. .fadeOut()
  10. .fadeTo()
  11. .hide()
  12. .queue()
  13. .show()
  14. .slideDown()
  15. slideToggle
  16. .slideUp()
  17. .stop()
  18. .toggle()