I have a problem – I would like to intercept all actions done on < a href=”…” > in content and display alert dialog before user will be redirected to specific pages. Unfortunately, my code does not work:
$('#description a').click(function() {
alert("XXX");
});
Any help would be appreciated!
Are you really using
alert()in your live page or some kind of dialog box?Because only alert will pause the page and prevent it from refreshing until it’s closed.
If so then you’ll have to manually stop the link from executing and then link manually.
Something like that