Re:10th Anniversary of JQuery
by lostPixels on Thursday January 14, 2016 @03:21PM
(#10904141)
I found out recently how much of a nightmare removeEventListener is compared to namespaced events in jQuery.
[ Parent
| on HN ]
Re:10th Anniversary of JQuery
by DonHopkins on Thursday January 14, 2016 @06:51PM
(#10905813)
jQuery has a nice efficient event delegation mechanism, that lets you listen for events on elements that don't even exist yet, by specifying selector patterns and listening on the root element with a few global event handlers, instead of adding listeners to every leaf element as it's created. It does all the bookkeeping and event handling in one place, so it saves a lot of memory and time. So not only does it work consistently across all browsers, but it also doesn't suck!
https://learn.jquery.com/events/handling-events/#binding-eve...