Pulling .live() functionality out of jQuery
Posted
by
Daniel
on Stack Overflow
See other posts from Stack Overflow
or by Daniel
Published on 2011-01-16T04:45:19Z
Indexed on
2011/01/16
4:53 UTC
Read the original article
Hit count: 145
I am writing a Firefox Add-On that currently is depending on jQuery for the following things:
- Selectors
- Animations
- A special .live("focus") hail-mary event-catching maneuver that happens to work with jQuery 1.4.2 (but not 1.4.4)
jQuery isn't well suited for functioning inside XUL, and it's a miracle we've gotten this far with it. We're trying to remove the jQuery requirements, the first two are easy (animations are simple, and we can use .querySelector() instead of jQuery), but the .live has proven impossible to do on our own. I've tried reading the source code, but I haven't been able to piece it apart.
What is the jQuery .live function doing? There's clearly a lot more going on than document.addEventListener("focus"/"focusin",function_to_pick_apart_events). What else is going on here?
© Stack Overflow or respective owner