24 ways to impress your friends

Jump to menu

Vote down?

Aaron Peterson

A great way to keep track of your cached jquery selectors (I think I picked this up from Alex Sexton) is to prefix the var names with a $. This makes it much easier to remember:

var $elem = $(”#foo”).find(”.bar”);