From: Michał Gołębiowski Date: Sun, 7 Apr 2013 11:48:46 +0000 (+0200) Subject: No ticket: Move jQuery.fn.size to deprecated. Close gh-1229. X-Git-Tag: 2.0.0-beta3~18 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=18d006762c557ed635404436f5733dccaf786f9f;p=jquery.git No ticket: Move jQuery.fn.size to deprecated. Close gh-1229. (cherry picked from commit e3777b64377947b7222a2050aee7f2ec371faef9) --- diff --git a/src/core.js b/src/core.js index a35e79893..265f0bc4a 100644 --- a/src/core.js +++ b/src/core.js @@ -179,11 +179,6 @@ jQuery.fn = jQuery.prototype = { // The default length of a jQuery object is 0 length: 0, - // The number of elements contained in the matched element set - size: function() { - return this.length; - }, - toArray: function() { return core_slice.call( this ); }, diff --git a/src/deprecated.js b/src/deprecated.js index 722edb006..40f8dd6cd 100644 --- a/src/deprecated.js +++ b/src/deprecated.js @@ -1,6 +1,11 @@ // Limit scope pollution from any deprecated API // (function() { +// The number of elements contained in the matched element set +jQuery.fn.size = function() { + return this.length; +}; + jQuery.fn.andSelf = jQuery.fn.addBack; // })();