remove event listener js code example
Example 1: javascript remove event listener
var someEventHander=function(event){
console.log("do something");
}
document.getElementById("someid").addEventListener('click',someEventHander);
document.getElementById("someid").removeEventListener('click',someEventHander);
Example 2: remove add event listener jquery
$( "p" ).off();
$( "p" ).off( "click", "**" );
Example 3: removeeventlistener
element.removeEventListener("mousedown", handleMouseDown)
Example 4: removeEventListener
target.removeEventListener(type, listener[, options]);
target.removeEventListener(type, listener[, useCapture]);