What are some quick tips for increasing jQuery performance?
find
function to find elements within the scope of that elements children. This is really only optimal if you are performing some operations on the common ancestor anyway; otherwise the overhead of finding the ancestor and caching it may outweigh the benefit of scoped traversal.$.each()
, use for(;;)
instead. It's over ten times faster.