mirror of
https://github.com/jquery/jquery.git
synced 2026-02-06 17:14:58 -05:00
Fix a regression where has with multiple contexts was not filtering correctly. Test added.
This commit is contained in:
@@ -48,12 +48,12 @@ jQuery.fn.extend({
|
||||
},
|
||||
|
||||
has: function( target ) {
|
||||
var i = 0,
|
||||
var i,
|
||||
targets = jQuery( target, this ),
|
||||
l = targets.length;
|
||||
len = targets.length;
|
||||
|
||||
return this.filter(function() {
|
||||
for ( ; i < l; i++ ) {
|
||||
for ( i = 0; i < len; i++ ) {
|
||||
if ( jQuery.contains( this, targets[i] ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user