Learning jQuery Learning jQuery

Performance Tips & Inserting Elements

Check out a free preview of the full Learning jQuery course:
The "Performance Tips & Inserting Elements" Lesson is part of the full, Learning jQuery course featured in this preview video. Here's what you'd learn in this lesson:

Tip: dealing with performance issues with JSPerf Use clone to copy elements that already exist. clone(true) copies events and data, too Overview of ways to insert elements Difference of appendTo and append, insertAfter and after is you are either inserting or moving elements append, prepend, after, before, wrap and wrapInner can now accept a function which returns the elements you want to insert Remove elements with the remove, detach and empty methods

Get Unlimited Access Now