A speedup for .remove() (which also speeds up .html()). Fixes #4178.
[jquery.git] / src / core.js
index d78ec7e..c7d10f3 100644 (file)
@@ -1234,7 +1234,7 @@ jQuery.each({
 
        empty: function() {
                // Remove element nodes and prevent memory leaks
-               jQuery( ">*", this ).remove();
+               jQuery(this).children().remove();
 
                // Remove any remaining nodes
                while ( this.firstChild )