I need to create a JavaScript function that is called at the click of a button and should cancel the click of a <a>
tag.
I tried this way:
$("#botao").click(function(){
$("a").unbind('click')
})
However, when you click on the tag, it will continue sending you the link of your href attribute. I've already tried with .off('click')
, but also with no success.
After canceling the click, you need to be able to go back with the click event.