I\'m trying to create one event listener to handle all my \"clicks\" by putting it on the body and doing some event delegation. A simple example of what i\'m trying to do i
If you want all the LI's in your body to be clicked, you can check against the nodeName.
Here is the fiddle: https://jsfiddle.net/swaprks/f3crax1q/
Javascript:
document.body.addEventListener('click', function(e){ if(e.target.nodeName == "LI"){alert("hi")} })