Closes #2510
This commit is contained in:
parent
3f5ff3097c
commit
28182b4320
12
src/core.js
12
src/core.js
|
@ -1146,17 +1146,17 @@ jQuery.extend({
|
||||||
merge: function( first, second ) {
|
merge: function( first, second ) {
|
||||||
// We have to loop this way because IE & Opera overwrite the length
|
// We have to loop this way because IE & Opera overwrite the length
|
||||||
// expando of getElementsByTagName
|
// expando of getElementsByTagName
|
||||||
var i = 0;
|
var i = 0, elem, pos = first.length;
|
||||||
// Also, we need to make sure that the correct elements are being returned
|
// Also, we need to make sure that the correct elements are being returned
|
||||||
// (IE returns comment nodes in a '*' query)
|
// (IE returns comment nodes in a '*' query)
|
||||||
if ( jQuery.browser.msie ) {
|
if ( jQuery.browser.msie ) {
|
||||||
for ( ; second[ i ]; i++ )
|
while ( elem = second[ i++ ] )
|
||||||
if ( second[ i ].nodeType != 8 )
|
if ( elem.nodeType != 8 )
|
||||||
first.push( second[ i ] );
|
first[ pos++ ] = elem;
|
||||||
|
|
||||||
} else
|
} else
|
||||||
for ( ; second[ i ]; i++ )
|
while ( elem = second[ i++ ] )
|
||||||
first.push( second[ i ] );
|
first[ pos++ ] = elem;
|
||||||
|
|
||||||
return first;
|
return first;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue