diff options
author | Timmy Willison <timmywillisn@gmail.com> | 2012-07-27 18:19:01 -0400 |
---|---|---|
committer | Timmy Willison <timmywillisn@gmail.com> | 2012-07-27 18:19:18 -0400 |
commit | e07b444dfe87f26f0d6031920026142425505ad6 (patch) | |
tree | ab6f77aea11aef07f78dde727ff25eea9b8d7c9e /src/traversing.js | |
parent | 4039d3668decade6c7098f7f270c45dd54ff6a8c (diff) | |
download | jquery-e07b444dfe87f26f0d6031920026142425505ad6.tar.gz jquery-e07b444dfe87f26f0d6031920026142425505ad6.zip |
Fix a regression where has with multiple contexts was not filtering correctly. Test added.
Diffstat (limited to 'src/traversing.js')
-rw-r--r-- | src/traversing.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/traversing.js b/src/traversing.js index 8685ae017..4c58ae0b8 100644 --- a/src/traversing.js +++ b/src/traversing.js @@ -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; } |