A speedup for .remove() (which also speeds up .html()). Fixes #4178.

This commit is contained in:
John Resig 2009-02-18 02:40:55 +00:00
parent 1ac087f6f9
commit 3e46bce751

View 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 )