Re: [jquery-dev] Making jQuery.empty over 10x faster

2009-12-13 Thread John Resig
Actually, now that you bring this up, it would make a lot of sense to just remove the element from the DOM first and /then/ go through and clean up the child nodes, and finally re-inject the element again. I'm hesitant to do a cloneNode because of the inherent problems that exist in Internet Explor

[jquery-dev] Making jQuery.empty over 10x faster

2009-12-13 Thread Devon Govett
Hi all, I've just blogged about a technique that I used to make jQuery.empty over 10x faster in some cases. Basically, rather than individually removing each child element from the DOM which causes the browser to reflow after each one, I use a shallow cloneNode to do the job then copying events b