Skip to content
Permalink
Browse files

Simplify jQuery#wrap

  • Loading branch information
markelog committed Dec 19, 2012
1 parent 2378438 commit 8c4b9f082bee05218f7e218b5a0db12e5e333ef4
Showing with 5 additions and 6 deletions.
  1. +5 −6 src/manipulation.js
@@ -156,15 +156,14 @@ jQuery.fn.extend({
var elem,
i = 0;

for ( ; (elem = this[i]) != null; i++ ) {
// Remove element nodes and prevent memory leaks
for ( ; ( elem = this[ i ] ) != null; i++ ) {
if ( elem.nodeType === 1 ) {

// Remove element nodes and prevent memory leaks
jQuery.cleanData( getAll( elem, false ) );
}

// Remove any remaining nodes
while ( elem.firstChild ) {
elem.removeChild( elem.firstChild );
// Remove any remaining nodes
elem.textContent = "";
}
}

0 comments on commit 8c4b9f0

Please sign in to comment.
You can’t perform that action at this time.