stop event listener jquery code example
Example 1: jquery prevent event bubbling
$('myclass').bind('amodaldestroy'), function(event) {
....does something....
event.stopPropagation();
});
Example 2: how to remove event listener in jquery
// adding an event listener using jQuery
$('h1').click(()=>{
console.log('clicked')
})
// unbinding event listener
$('h1').unbind()