Simon Willison’s Weblog

Blogmarks tagged javascript, events

Filters: Type: blogmark × javascript × 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

Freebase Hack Day. I’m finding Freebase increasingly interesting at the moment, and their public hack day on the 8th November in San Francisco looks like it could be a lot of fun. They’ll be previewing Acre, a new server-side JavaScript application platform targeted at building Freebase powered applications. Hit “view source” at the bottom of the hack day site to see what an Acre app looks like. # 24th October 2008, 12:06 am

HTML5 Media Support in WebKit. WebKit continues to lead the pack when it comes to trying out new HTML5 proposals. The new audio and video elements make embedding media easy, and provide a neat listener API for hooking in to “playback ended” events. # 12th November 2007, 11:21 pm

JavaScript Madness: Keyboard Events. Keyboard events in JavaScript are a total pain. This looks like a pretty comprehensive reference to getting them to work cross-browser. # 9th November 2007, 11:07 pm

Prototype 1.6.0 release candidate. Prototype gets a long-needed update to its Event API, and some interesting new Function.prototype extensions. # 16th August 2007, 8:49 am