Commit 7e06b9b7 authored by John Resig's avatar John Resig

Tweaked the detach addition in commit [6474].

parent 7a67f889
...@@ -161,6 +161,10 @@ jQuery.fn.extend({ ...@@ -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,12 +260,10 @@ jQuery.each({ ...@@ -256,12 +260,10 @@ 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() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment