mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Tweaked the detach addition in commit [6474].
This commit is contained in:
parent
7a67f8897d
commit
7e06b9b70f
@ -161,6 +161,10 @@ jQuery.fn.extend({
|
|||||||
return this.after( value ).remove();
|
return this.after( value ).remove();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
detach: function( selector ) {
|
||||||
|
return this.remove( selector, true );
|
||||||
|
},
|
||||||
|
|
||||||
domManip: function( args, table, callback ) {
|
domManip: function( args, table, callback ) {
|
||||||
var fragment, scripts, cacheable, cached, cacheresults, first,
|
var fragment, scripts, cacheable, cached, cacheresults, first,
|
||||||
value = args[0];
|
value = args[0];
|
||||||
@ -256,14 +260,12 @@ jQuery.each({
|
|||||||
cleanData( jQuery("*", this).add(this) );
|
cleanData( jQuery("*", this).add(this) );
|
||||||
}
|
}
|
||||||
|
|
||||||
this.parentNode && this.parentNode.removeChild( this );
|
if ( this.parentNode ) {
|
||||||
|
this.parentNode.removeChild( this );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
detach: function( selector ) {
|
|
||||||
jQuery( this ).remove( selector, true )
|
|
||||||
},
|
|
||||||
|
|
||||||
empty: function() {
|
empty: function() {
|
||||||
// Remove element nodes and prevent memory leaks
|
// Remove element nodes and prevent memory leaks
|
||||||
if ( this.nodeType === 1 ) {
|
if ( this.nodeType === 1 ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user