There is feature click binding on selector
$(document).on("click", ".onClass", function () {
//your code
var element = $(this); // to get clicked element
});
Is there any analog with pure js?
P.S. I have seen this solution How to get the element clicked (for the whole document)? but it is not a solution i am expecting.