Tweaked the detach addition in commit [6474].

This commit is contained in:
John Resig 2009-07-21 15:57:51 +00:00
parent 7a67f8897d
commit 7e06b9b70f

View file

@ -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,12 +260,10 @@ 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() {