News for hackers. Stuff that matters.
Re:How Bad is DOM Interaction Really? by bkjelden on Saturday August 10, 2013 @02:25PM (#6192085)
Caching jQuery selectors may result in a speedup, but as with all caching systems I've run into nasty, hard to trace bugs that were the result of stale cached jQuery selectors.

So I'd add the caveat to caching jQuery selectors that standard premature optimization rules still apply.

Re:How Bad is DOM Interaction Really? by bdg on Saturday August 10, 2013 @04:19PM (#6192510)
Caching them in local fucntion scope should be harmless. For instance: grabbing #x, using it inside a decision structure and iterator. Caching #x as a global constant is probably setting you up for some fun debuging later.