diff --git a/src/core.js b/src/core.js index b8b207b7..3900a0a5 100644 --- a/src/core.js +++ b/src/core.js @@ -1016,14 +1016,14 @@ jQuery.extend({ if ( fragment ) { for ( var i = 0; ret[i]; i++ ) { - elem = ret[i]; - if ( jQuery.nodeName( elem, "script" ) ) { - if( elem.parentNode ) - elem.parentNode.removeChild( elem ); + var node = ret[i]; + if ( jQuery.nodeName( node, "script" ) ) { + if( node.parentNode ) + node.parentNode.removeChild( node ); } else { - if ( elem.nodeType === 1 ) - ret = jQuery.merge( ret, elem.getElementsByTagName("script")); - fragment.appendChild( elem ); + if ( node.nodeType === 1 ) + ret = jQuery.merge( ret, node.getElementsByTagName("script")); + fragment.appendChild( node ); } }