Live Query jQuery plugin. Ingenious plugin that lets you register jQuery event bindings to be executed when a new element matching the provided selector is added to the DOM. Performance is kept snappy by only running the check after a jQuery DOM manipulation method has been executed (append, prepend, attr etc); it won’t notice elements added using regular DOM methods.
Seems to me you could fix that problem by adding the event handler to the document and relying on bubbling.
Jim - 23rd August 2007 00:24 - #
Fantastic article. I seem to end up writing a function that checks to see if methods are already applied to a set of elements, and if not applies my functions. Then when I add new items to the DOM via .append et al, I re-call my function. Yuck.
Nice find!