Selector state wasn't being passed along on a cloned jQuery object.
This commit is contained in:
parent
49d0d5b7a3
commit
c6f189ac73
2 changed files with 12 additions and 1 deletions
|
@ -73,6 +73,12 @@ jQuery.fn = jQuery.prototype = {
|
|||
} else if ( jQuery.isFunction( selector ) )
|
||||
return jQuery( document ).ready( selector );
|
||||
|
||||
// Make sure that old selector state is passed along
|
||||
if ( selector.selector && selector.context ) {
|
||||
this.selector = selector.selector;
|
||||
this.context = selector.context;
|
||||
}
|
||||
|
||||
return this.setArray(jQuery.makeArray(selector));
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue