add click event listener to achor with javascript code example

Example 1: javascript remove event listener not working

var someEventHander=function(){
	console.log("do something");
}
var handlerCopy=someEventHandler.bind(var1,var2)
//add listener
document.getElementById("someid").addEventListener('click',handlerCopy,true);
//remove listener 
document.getElementById("someid").removeEventListener('click',handlerCopy,true);

Example 2: how to add css for ::before event in jquery

how to add css for ::before event in jquery

Tags:

Java Example