jQuery Performance Tips

0 views
Skip to first unread message

Sean Copenhaver

unread,
Jul 11, 2011, 8:39:37 AM7/11/11
to ColaCodeDojo
Another from last weeks JavaScript Weekly issue. Has some simple things like try to cache the results of jQuery selectors that you need to work or use regular JavaScript where you can ('this.id' instead of '$(this).attr('id')' as an example from the slides). Also some more interesting ones like trying to use .live() events and .detach() if you need to work with a part of the DOM a lot.

Another cool thing is each tip come with a link out to jsPerf tests to demonstrate the gains.
http://addyosmani.com/jqprovenperformance/

--
“The limits of language are the limits of one's world. “ -Ludwig von Wittgenstein
Reply all
Reply to author
Forward
0 new messages