Fixed #2070 by adding a test for !nodeType to isArrayLike so DOM elements like SELECT are not considered array-like (even though they really are).
This commit is contained in:
parent
d1b9ad3cdb
commit
24e036c7c8
2 changed files with 3 additions and 5 deletions
|
@ -352,11 +352,9 @@ jQuery.fn = jQuery.prototype = {
|
|||
else
|
||||
selector = jQuery.multiFilter( selector, this );
|
||||
|
||||
var isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType;
|
||||
return this.filter(function() {
|
||||
// check to see if the selector is array-like otherwise assume it is just a DOM element
|
||||
return ( selector.length && selector[selector.length - 1] !== undefined )
|
||||
? jQuery.inArray( this, selector ) < 0
|
||||
: this != selector;
|
||||
return isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector;
|
||||
});
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue