javascript addeventlistener

JavaScript
var element=document.getElementById("some_id");
var listener=element.addEventListener('click',function(event){                          
            
 }); var element = document.getElementById("#id");
element.addEventListener('click', function(){
	console.log("click");
});//with jQuery
$("#id / .class").on('click', function(){
	console.log("click");
});
Source

Also in JavaScript: