]> source.dussan.org Git - jquery.git/commitdiff
jquery core: small code reduction.
authorAriel Flesler <aflesler@gmail.com>
Tue, 6 May 2008 01:29:13 +0000 (01:29 +0000)
committerAriel Flesler <aflesler@gmail.com>
Tue, 6 May 2008 01:29:13 +0000 (01:29 +0000)
src/core.js

index 6accbc4663b2bcfd50f3fc9e3dfbb90cde08624b..6b497fdcf1e6684dba3bc6f43d6bcf9658fb0ba9 100644 (file)
@@ -1138,16 +1138,16 @@ jQuery.extend({
        merge: function( first, second ) {
                // We have to loop this way because IE & Opera overwrite the length
                // expando of getElementsByTagName
-
+               var i = 0;
                // Also, we need to make sure that the correct elements are being returned
                // (IE returns comment nodes in a '*' query)
                if ( jQuery.browser.msie ) {
-                       for ( var i = 0; second[ i ]; i++ )
+                       for ( ; second[ i ]; i++ )
                                if ( second[ i ].nodeType != 8 )
                                        first.push( second[ i ] );
 
                } else
-                       for ( var i = 0; second[ i ]; i++ )
+                       for ( ; second[ i ]; i++ )
                                first.push( second[ i ] );
 
                return first;