I’m trying to implement a bookmarklet where the user will click one <img/> and will be redirected to another page where he will annotate the image.
If the image is inserted within a HTML anchor:
<a href="http://anywhere.org"><img src=""http://anywhere.org/image.png"/></a>,
Can I prevent the anchor to be activated? I tried
event.stopPropagation();
and/or
event.preventDefault();
but it didn’t work
First you can check if the event can be cancelated or not using:
And you can always try the classic
That will pretty much stop it.