diff options
Diffstat (limited to 'src/traversing')
-rw-r--r-- | src/traversing/findFilter.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/traversing/findFilter.js b/src/traversing/findFilter.js index f903ac715..dd70a73f7 100644 --- a/src/traversing/findFilter.js +++ b/src/traversing/findFilter.js @@ -53,14 +53,14 @@ jQuery.filter = function( expr, elems, not ) { jQuery.fn.extend({ find: function( selector ) { - var i = 0, + var i, len = this.length, ret = [], self = this; if ( typeof selector !== "string" ) { return this.pushStack( jQuery( selector ).filter(function() { - for ( ; i < len; i++ ) { + for ( i = 0; i < len; i++ ) { if ( jQuery.contains( self[ i ], this ) ) { return true; } @@ -68,8 +68,7 @@ jQuery.fn.extend({ }) ); } - i = 0; - for ( ; i < len; i++ ) { + for ( i = 0; i < len; i++ ) { jQuery.find( selector, self[ i ], ret ); } |