Commit 3e46bce7 authored by John Resig's avatar John Resig

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

parent 1ac087f6
......@@ -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 )
......
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