I have an element that has numerous event triggers attached to it.
How do I cancel all of those events (without editing the code of those triggers) and add a new one.
So far, I have tried this without luck:
$(document).ready(function() {
$( document ).on( 'click', '#element', function(e) {
$(this).off();
e.preventDefault();
e.stopPropagation();
e.stopImmediatePropagation();
// now that it's cancelled, do NEW stuff below
alert('test');
});
});