Simon Willison’s Weblog

Subscribe

Event Delegation Made Easy. Dan Webb demonstrates a neat trick for event delegation in jQuery, using CSS selectors and the jQuery .is() method to dispatch to different callbacks from a single event handler based on the target of the event.