96 // Start with an empty Selector
97 selector:"",
98
99// The current version of jquery being used
100 jquery:"1.3.2",
101
102// The number of elements contained in the matched element set
103 size:Function(){
104Return This. Length;
105 },
106
107// Get the nth element in the matched element set or
108// Get the whole matched element set as a clean Array
109 get:Function(Num ){
110ReturnNum === undefined?
111
112// Return a 'clean' Array
113 array. Prototype. Slice. Call (This):
114
115// Return just the object
116This[Num];
117 },
Slave97Line starts538Line, definedJqueryThe methods and attributes shared by the object.
97The row defines an attribute on the object.SelectorIndicates the selector currently in use.
110The row defines an attribute on the object. Jquery, Indicating the currentJqueryVersion
103The row definesJqueryObjectSizeMethod, becauseJqueryThe object is an array-like object.LengthAttribute, that is, the number of objects in the query results.
109To117Line, definedGetMethod to return the query object of the specified subobject.
Where110The row is used to determine whether the subscript parameter is passed. If the subscript parameter is passed, the parameterNumNot equal Undefined, Note that===Used to determine whether it is completely equal.
If a parameter is passed116Row through attribute Indexer[]To obtain the specified object.
If no parameter is passed, use113Line Processing.
113 The row first passes Array. Prototype Find Array Because the array method is provided by this prototype object. Then, call Slice Method. Call Used to take the first parameter as the method This Parameter input, that is, to obtain the current query result object, the array Slice Two parameters can be passed. The first parameter indicates the start subscript, and the second parameter indicates the end subscript. If neither of the two parameters is provided, the start subscript is 0, End subscript is Length . Slice Returns the subscript from start to end. -1 And encapsulate the results into a new real array object.