aboutsummaryrefslogtreecommitdiffstats
path: root/src/traversing.js
diff options
context:
space:
mode:
authorDave Methvin <dave.methvin@gmail.com>2012-05-11 15:11:13 -0400
committerDave Methvin <dave.methvin@gmail.com>2012-05-11 15:11:13 -0400
commit56d5c1c3a3b012b159e56acbb655a14abfcc8894 (patch)
tree1c3c938159f303e7ef46a2b2be9a8f938619363b /src/traversing.js
parentc5fda2945c14566900d89b08c4202129e629877f (diff)
downloadjquery-56d5c1c3a3b012b159e56acbb655a14abfcc8894.tar.gz
jquery-56d5c1c3a3b012b159e56acbb655a14abfcc8894.zip
Fix #11738. Remove deprecated .closest(Array) => Array.
Diffstat (limited to 'src/traversing.js')
-rw-r--r--src/traversing.js22
1 files changed, 1 insertions, 21 deletions
diff --git a/src/traversing.js b/src/traversing.js
index aa8c10cc0..0627ab4f0 100644
--- a/src/traversing.js
+++ b/src/traversing.js
@@ -84,28 +84,8 @@ jQuery.fn.extend({
},
closest: function( selectors, context ) {
- var ret = [], i, l, cur = this[0];
+ var ret = [], i, l, cur;
- // Array (deprecated as of jQuery 1.7)
- if ( jQuery.isArray( selectors ) ) {
- var level = 1;
-
- while ( cur && cur.ownerDocument && cur !== context ) {
- for ( i = 0; i < selectors.length; i++ ) {
-
- if ( jQuery( cur ).is( selectors[ i ] ) ) {
- ret.push({ selector: selectors[ i ], elem: cur, level: level });
- }
- }
-
- cur = cur.parentNode;
- level++;
- }
-
- return ret;
- }
-
- // String
var pos = POS.test( selectors ) || typeof selectors !== "string" ?
jQuery( selectors, context || this.context ) :
0;