aboutsummaryrefslogtreecommitdiffstats
path: root/src/traversing/findFilter.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/traversing/findFilter.js')
-rw-r--r--src/traversing/findFilter.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/traversing/findFilter.js b/src/traversing/findFilter.js
index 71fe52aaf..f903ac715 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,
+ var i = 0,
+ len = this.length,
ret = [],
- self = this,
- len = self.length;
+ self = this;
if ( typeof selector !== "string" ) {
return this.pushStack( jQuery( selector ).filter(function() {
- for ( i = 0; i < len; i++ ) {
+ for ( ; i < len; i++ ) {
if ( jQuery.contains( self[ i ], this ) ) {
return true;
}
@@ -68,7 +68,8 @@ jQuery.fn.extend({
}) );
}
- for ( i = 0; i < len; i++ ) {
+ i = 0;
+ for ( ; i < len; i++ ) {
jQuery.find( selector, self[ i ], ret );
}