X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fmanipulation.js;h=dbf86a7b3aff9d30576de8cd1e6888a644e174fb;hb=7e06b9b70f23dffd9c74047895b53b28af0dafc6;hp=1b8066f00fdee1d755def0b84325c5039a310ee4;hpb=7a67f8897d3c2ed97254f0fdb969be14e77962d1;p=jquery.git diff --git a/src/manipulation.js b/src/manipulation.js index 1b8066f..dbf86a7 100644 --- a/src/manipulation.js +++ b/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 ) {