remove onclick event javascript jqery code example
Example 1: how to remove event listener in jquery
// adding an event listener using jQuery
$('h1').click(()=>{
console.log('clicked')
})
// unbinding event listener
$('h1').unbind()
Example 2: remove a function added to eventhandler
element.removeEventListener(type, handler);