Skip to content
Permalink
Browse files

Tweaked the detach addition in commit [6474].

  • Loading branch information
jeresig committed Jul 21, 2009
1 parent 7a67f88 commit 7e06b9b70f23dffd9c74047895b53b28af0dafc6
Showing with 7 additions and 5 deletions.
  1. +7 −5 src/manipulation.js
@@ -161,6 +161,10 @@ jQuery.fn.extend({
return this.after( value ).remove();
},

detach: function( selector ) {
return this.remove( selector, true );
},

domManip: function( args, table, callback ) {
var fragment, scripts, cacheable, cached, cacheresults, first,
value = args[0];
@@ -256,14 +260,12 @@ jQuery.each({
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() {
// Remove element nodes and prevent memory leaks
if ( this.nodeType === 1 ) {

0 comments on commit 7e06b9b

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