Simon Willison’s Weblog

Items tagged jquery, events

Filters: jquery × events ×

jQuery special events. Ben Alman’s comprehensive guide to jQuery’s special events API, which allows you to register new kinds of events that can then be attached and detached using jQuery’s bind and unbind methods. Ben’s clickoutside event is a particularly useful example. # 17th April 2010, 9:08 pm

Special Events in jQuery. How to add a custom “tripleclick” event to jQuery, using the jQuery.event.special extension hook. # 30th March 2009, 10:15 am

jQuery: Changeset 5990. “Added a new liveQuery/event delegation hybrid method”. Lets you add events that continue to work as new elements are dynamically appended to the DOM, e.g. $(’div’).live(’click’, fn). Works by adding an event handler to the root document element itself and relying on event bubbling. I have to admit I preferred the earlier proposal of $(’div’).delegate(’’..), which feels like it should have much better performance—anyone know of a good plugin that supports this? # 23rd December 2008, 12:22 pm

Visual Event. External code loading bookmarklet that visualises the JavaScript events hooked up to the current page, and lets you view the source code of the event handling function for each one. Only works for events added by jQuery, YUI or MooTools since those libraries maintain a cache of event handlers that they add, to work around the standard DOM’s omission of handler introspection. # 10th December 2008, 3:38 pm