Copy codeThe Code is as follows:
JQuery. fn = jQuery. prototype = {
Constructor: jQuery,
Init: function (selector, context, rootjQuery ){},
Selector :"",
Jquery: "1.7.2 ",
Length: 0,
Size: function (){},
ToArray: function (){},
Get: function (num ){},
PushStack: function (elems, name, selector ){},
Each: function (callback, args ){},
Ready: function (fn ){},
Eq: function (I ){},
First: function (){},
Last: function (){},
Slice: function (){},
Map: function (callback ){},
End: function (){},
Push: push,
Sort: []. sort,
Splice: []. splice
};
The above are some attributes and methods on the prototype of jQuery of this version.
Selector: used to record the selector of the init parameter. but not necessarily equal.
$ ("Div"). selector; // "div"
$ ("Div"). find (p). selecctor; // "div p ";
This property is generally used for debugging.
Jquery: jQuery version number.
Length: number of elements.
Size (): equivalent to length, the memory overhead of length is smaller.
The remaining members will be introduced in the following sections.