@@ 241-265 (lines=25) @@ | ||
238 | ||
239 | // Take an array of elements and push it onto the stack |
|
240 | // (returning the new matched element set) |
|
241 | pushStack: function( elems, name, selector ) { |
|
242 | // Build a new jQuery matched element set |
|
243 | var ret = this.constructor(); |
|
244 | ||
245 | if ( jQuery.isArray( elems ) ) { |
|
246 | push.apply( ret, elems ); |
|
247 | ||
248 | } else { |
|
249 | jQuery.merge( ret, elems ); |
|
250 | } |
|
251 | ||
252 | // Add the old object onto the stack (as a reference) |
|
253 | ret.prevObject = this; |
|
254 | ||
255 | ret.context = this.context; |
|
256 | ||
257 | if ( name === "find" ) { |
|
258 | ret.selector = this.selector + ( this.selector ? " " : "" ) + selector; |
|
259 | } else if ( name ) { |
|
260 | ret.selector = this.selector + "." + name + "(" + selector + ")"; |
|
261 | } |
|
262 | ||
263 | // Return the newly-formed element set |
|
264 | return ret; |
|
265 | }, |
|
266 | ||
267 | // Execute a callback for every element in the matched set. |
|
268 | // (You can seed the arguments with an array of args, but this is |
@@ 233-257 (lines=25) @@ | ||
230 | ||
231 | // Take an array of elements and push it onto the stack |
|
232 | // (returning the new matched element set) |
|
233 | pushStack: function( elems, name, selector ) { |
|
234 | // Build a new jQuery matched element set |
|
235 | var ret = this.constructor(); |
|
236 | ||
237 | if ( jQuery.isArray( elems ) ) { |
|
238 | push.apply( ret, elems ); |
|
239 | ||
240 | } else { |
|
241 | jQuery.merge( ret, elems ); |
|
242 | } |
|
243 | ||
244 | // Add the old object onto the stack (as a reference) |
|
245 | ret.prevObject = this; |
|
246 | ||
247 | ret.context = this.context; |
|
248 | ||
249 | if ( name === "find" ) { |
|
250 | ret.selector = this.selector + (this.selector ? " " : "") + selector; |
|
251 | } else if ( name ) { |
|
252 | ret.selector = this.selector + "." + name + "(" + selector + ")"; |
|
253 | } |
|
254 | ||
255 | // Return the newly-formed element set |
|
256 | return ret; |
|
257 | }, |
|
258 | ||
259 | // Execute a callback for every element in the matched set. |
|
260 | // (You can seed the arguments with an array of args, but this is |