I have an EventListener that references an Id and it works well, the only problem is that i have at least a dozen places where this EventListener needs to reference so i don
If you're not using jQuery
you can use querySelectorAll:
var els = document.querySelectorAll(".chartJump");
for (var i = 0; i < els.length; i++) {
els[i].addEventListener("click", function (e) {
e.preventDefault()
eventHandler();
});
};
If you've jQuery
you can use on:
$(".chartJump").on('click', function () {
// Your code
});