jQuery equivalent of JavaScript’s addEventListener method

Not all browsers support event capturing (for example, Internet Explorer versions less than 9 don’t) but all do support event bubbling, which is why it is the phase used to bind handlers to events in all cross-browser abstractions, jQuery’s included.

The nearest to what you are looking for in jQuery is using bind() (superseded by on() in jQuery 1.7+) or the event-specific jQuery methods (in this case, click(), which calls bind() internally anyway). All use the bubbling phase of a raised event.

Leave a Comment