Skip to content

Commit 81bd846

Browse files
committed
Core, Traversing: Add size & andSelf methods
Fixes jquerygh-62
1 parent 10913e0 commit 81bd846

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/core.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,9 @@ jQuery.sub = function() {
111111
migrateWarn( "jQuery.sub() is deprecated" );
112112
return jQuerySub;
113113
};
114+
115+
// The number of elements contained in the matched element set
116+
jQuery.fn.size = function() {
117+
migrateWarn( "jQuery.fn.size is deprecated; use the length property." );
118+
return this.length;
119+
};

src/traversing.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
jQuery.fn.andSelf = function() {
2+
migrateWarn( "jQuery.fn.andSelf is deprecated; use jQuery.fn.addBack." );
3+
return jQuery.fn.addBack.apply( this, arguments );
4+
};

0 commit comments

Comments
 (0)