re: How to add event listener to dynamically added elements VIEW POST

FULL DISCUSSION
 

This pattern is usually called event delegation (for anyone looking for more info).

Nice simple explanation of a scenario where you would need it.

code of conduct - report abuse