Extend one object with one or more others, returning the modified object.
If no target is specified, the JQuery namespace itself is extended. This can be useful for plugin authors wishing to add new methods to JQuery.
Keep in mind that the target object will be modified, and will be returned from extend().
If a boolean true is specified as the first argument, JQuery performs a deep copy, recursively copying any objects it finds. Otherwise, the copy will share structure with the original object(s).
Undefined properties are not copied. However, properties inherited from the object's prototype will be copied over.Arguments:
| deep (Optional) | Boolean | |
|---|---|---|
| If set, the merge becomes recursive (i.e. deep copy). | ||
| target | Object | |
| The object to extend. | ||
| object1 | Object | |
| The object that will be merged into the first. | ||
| objectN (Optional) | Object | |
| More objects to merge into the first. | ||
