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
|
@ -53,7 +53,7 @@ test("jQuery()", function() {
|
|||
});
|
||||
|
||||
test("selector state", function() {
|
||||
expect(26);
|
||||
expect(28);
|
||||
|
||||
var test;
|
||||
|
||||
|
@ -80,6 +80,11 @@ test("selector state", function() {
|
|||
test = jQuery("#main", document.body);
|
||||
equals( test.selector, "#main", "#main Selector" );
|
||||
equals( test.context, document.body, "#main Context" );
|
||||
|
||||
// Test cloning
|
||||
test = jQuery(test);
|
||||
equals( test.selector, "#main", "#main Selector" );
|
||||
equals( test.context, document.body, "#main Context" );
|
||||
|
||||
test = jQuery(document.body).find("#main");
|
||||
equals( test.selector, "#main", "#main find Selector" );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue