mirror of
https://github.com/jquery/jquery.git
synced 2025-01-10 18:24:24 +00:00
Revert "Deprecated: Drop size and andSelf methods"
This reverts commit f110360f65
.
This commit is contained in:
parent
ea2f10c104
commit
de30e4a73d
@ -20,7 +20,15 @@ jQuery.fn.extend( {
|
|||||||
return arguments.length === 1 ?
|
return arguments.length === 1 ?
|
||||||
this.off( selector, "**" ) :
|
this.off( selector, "**" ) :
|
||||||
this.off( types, selector || "**", fn );
|
this.off( types, selector || "**", fn );
|
||||||
|
},
|
||||||
|
size: function() {
|
||||||
|
return this.length;
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
jQuery.fn.andSelf = jQuery.fn.addBack;
|
||||||
|
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -39,3 +39,9 @@ QUnit.test( "delegate/undelegate", function( assert ) {
|
|||||||
.undelegate( "b", "click" )
|
.undelegate( "b", "click" )
|
||||||
.remove();
|
.remove();
|
||||||
} );
|
} );
|
||||||
|
if ( jQuery.fn.size ) {
|
||||||
|
test("size()", function() {
|
||||||
|
expect(1);
|
||||||
|
equal( jQuery("#qunit-fixture p").size(), 6, "Get Number of Elements Found" );
|
||||||
|
});
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user