alternatively, if there are going to be a ton of anchors, then registering click handlers on all them can become an inconsiderate resource hawg — so you might instead choose to register just a single click handler on a wrapper element, and then only perform some logic if the event target is an anchor you are interested in adding behavior to.
If anchors are continually being added to the page after “ready”, and you need to handle events on them… you can use:
var anchors = $('a');anchors.live('click',function(){ anchors.not(this).addClass('wow');});so, you still have no excuse for not caching DOM selections in the case of event handling.