See in the original: Jquery.extend () function
The jquery extension method extend is a common method in the process of writing plugins, but it is often difficult to figure out the following two ways to write a relationship:
1, $.extend (dest,src1,src2,src3 ...);
Will Src1, SRC2, src3 ... Merging into Dest, DEST,SRC can be an array, an object, a function, and if the dest argument is omitted, then $.extend (SRC) can have only one parameter: SRC, at which point it is used to merge src into the object that invokes it, that is, to merge into the jquery global object.
2, $.fn.extend (SRC);
This is the same as writing 1 omitted dest, but because its calling object is $.fn, its role is to merge src into the jquery instance.
3,$. Extend (BOOLEAN,DEST,SRC1,SRC2,SRC3 ...) ;
The first parameter, Boolean, indicates whether deep copies are made, and the remaining parameters are consistent with those described earlier;
The so-called deep merge refers to the SRC1,SRC2,SRC3 and other arrays or objects not only the parent merge, and the various children are also merged, if the item with the same name, then the item of the following parameter overrides the item of the preceding parameter, explained in detail see the Jquery.extend () function
Summary of $.extend methods in jquery