Skip to main content

Bug Tracker

Side navigation

Ticket #3749: jquery-removethis.patch
File jquery-removethis.patch, 0.4 KB (added by kkaefer, December 25, 2008 07:36PM UTC)

better code style

Index: core.js
===================================================================
--- core.js	(revision 5998)
+++ core.js	(working copy)
@@ -1295,6 +1295,13 @@
 				this.parentNode.removeChild( this );
 		}
 	},
+	
+	removeThis: function() {
+		while ( this.firstChild ) {
+			this.parentNode.insertBefore( this.firstChild, this );
+		}
+		jQuery( this ).remove();
+	},
 
 	empty: function() {
 		// Remove element nodes and prevent memory leaks

Download in other formats:

Original Format