I need to find a equivalent of .on()
method of jquery
.
My problem is with use of addEventListener
, why can't I extend to all future elements of class?
What is the equivalent of $("button").on("click", notify)
in javascript for future propagation?
Asked
Active
Viewed 51 times
1
![](../../users/profiles/4756309.webp)
Weak to Enuma Elish
- 4,531
- 3
- 22
- 36
![](../../users/profiles/6571757.webp)
User
- 166
- 1
- 11
-
Take a look at this: https://stackoverflow.com/questions/15112067/how-does-jquery-on-work and this: https://stackoverflow.com/questions/9814298/does-jquery-on-work-for-elements-that-are-added-after-the-event-handler-is-cre – gforce301 Jun 02 '17 at 13:47