As @ben said, jQuery is pretty quick, but has it’s own pitfalls that come with the simple syntax. If one of my scripts is running slower than expected, there are a few things I tend to look for.
1) selectors – sometimes while writing an initial version of something my selectors won’t be as specific as they should be, so rather than $(‘a’) or even $(’#wrapper a’) you should probably make them as specific as possible, a tie in to a specific id is always best when possible but remember jQuery has to loop through all the available elements that meet your definition from the start. So make that first element as specific as possible (instead of body, use div#header or ul#nav), searching for classes $(’.classname’) can be especially troublesome without something in front of it to narrow down the search. Because you’re familiar with pure javascript, think how you would do it there and keep it close to that when possible.
2) loops – it’s amazing how quickly nested loops can add up, especially when you’re looking for particular attributes or an element as discussed above. The .each() method is powerful and useful, but if you’re using it too much it can really take some time. Three nested loops with only 10 elements a piece has the chance to loop 1000 times, the same loops with only 5 more elements in each takes more than 3 times as long.
3) DOM manipulation is usually the most time and processor intensive aspect of a script. (so creating, inserting, etc)... If I remember correctly, innerHTML is still the quickest way to get things done. So for simple things, and when it’s practical, have your server side piece send formatted html. When that’s not possible, try to create your snippet outside of the document and then drop it in as one piece. So rather than inserting a div, then inserting a list, then inserting the list items, do all of the creation on a snippet outside the document and insert it as a single unit. This makes it so the browser isn’t trying to render each piece as it’s dropped in. See if it makes a difference.
Different browsers still have different points they hang up on, so you may want to try a few to narrow down what’s causing the delay you’re seeing. Usually for me it’s one of the above.
When all else fails, google “optimizing jQuery” and someone has probably run into the problem you’re having before.