jQuery.fn = jQuery.prototype = {
init: function( selector, context ) {
jQuery.fn = jQuery.prototype = {
init: function( selector, context ) {
- var match, elem, ret, doc, parent;
+ var match, elem, ret, doc;
- parent = ret.cacheable ? ret.fragment.cloneNode(true) : ret.fragment;
- selector = [];
-
- while ( parent.firstChild ) {
- selector.push( parent.removeChild( parent.firstChild ) );
- }
+ selector = (ret.cacheable ? ret.fragment.cloneNode(true) : ret.fragment).childNodes;
// Execute the function immediately
fn.call( document, jQuery );
// Otherwise, remember the function for later
// Execute the function immediately
fn.call( document, jQuery );
// Otherwise, remember the function for later