Friday, 15 August 2014

javascript - jQuery - catch and override links with target=_blank -



javascript - jQuery - catch and override links with target=_blank -

we have legacy pages have links target="_blank". on clicking these i'd ignore , run javascript have opening windows.

is possible jquery, if methods/terms should research?

thanks in advance

$('a[target=_blank]').click(function(e){ e.preventdefault(); //do want here });

demo: http://jsfiddle.net/kkhnr/1/

javascript jquery html

No comments:

Post a Comment