8 ms·
live events are great since they can be bound to future elements. this simplifies, for example, adding components with ajax.
by diN0bot 18y ago
live events are great since they can be bound to future elements. this simplifies, for example, adding components with ajax.
- hs 18y agodoes it replace the livequery plugin?
- mrkurt 18y agoMostly. The livequery plugin lets you watch for new elements and do something when they appear. It's a little resource intensive, since it polls the DOM repeatedly. The jQuery version doesn't have that, and probably for good reason.
- nirmal 18y agoI believe the jQuery version attaches the handlers to document which allows it to use event bubbling. I got this info from a comment posted here by jresig himself. http://news.ycombinator.com/item?id=406653 http://news.ycombinator.com/item?id=406653