mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Simplify jQuery#wrap
This commit is contained in:
parent
2378438a97
commit
8c4b9f082b
@ -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 = "";
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user