Unbind onclick event
Hello,
I have a config button in the header of my app. In inner pages I want to modify this same button to use it as a "go back" button.
The original onclick event (which shows the configuration page) was added through an appery event.
I've managed to change this button's icon and add a new onclick event using jquery, in specific pages.
But I've noticed now both events are being fired. So I need to unbind the original event.
I've tried using:
$( "#foo" ).unbind( "click" );
Or:
$( "#foo" ).off( "click" );
But none have worked. Both events are still being fired on click.
How would I do this?
Thank you