Simplify jQuery#wrap

This commit is contained in:
Oleg 2012-12-19 22:42:07 +04:00
parent 2378438a97
commit 8c4b9f082b

View File

@ -157,14 +157,13 @@ jQuery.fn.extend({
i = 0;
for ( ; ( elem = this[ i ] ) != null; i++ ) {
// Remove element nodes and prevent memory leaks
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 );
elem.textContent = "";
}
}