Revert "Deprecated: Drop size and andSelf methods"

This reverts commit f110360f65.
This commit is contained in:
Oleg Gaidarenko 2015-11-13 17:01:53 +03:00
parent ea2f10c104
commit de30e4a73d
2 changed files with 14 additions and 0 deletions

View File

@ -20,7 +20,15 @@ jQuery.fn.extend( {
return arguments.length === 1 ?
this.off( selector, "**" ) :
this.off( types, selector || "**", fn );
},
size: function() {
return this.length;
}
} );
jQuery.fn.andSelf = jQuery.fn.addBack;
} );

View File

@ -39,3 +39,9 @@ QUnit.test( "delegate/undelegate", function( assert ) {
.undelegate( "b", "click" )
.remove();
} );
if ( jQuery.fn.size ) {
test("size()", function() {
expect(1);
equal( jQuery("#qunit-fixture p").size(), 6, "Get Number of Elements Found" );
});
}