Is there a way to add some kind of listener for a type of html element? For example if i wanna call a function when the user clicks any p element
Look at this JSFiddle, and see if it works for you
Click Yes Click No Clicked: