I want to call my custom function (or simply execute certain logic) whenever user clicks on any a
that does not open in a new window and has href
attribute which is not empty and does not start with #
and does not have javascript:
.
Basically I need all those links that, if clicked will lead to the current page be unloaded. But all other links like #point1
or javascript:alert('');
, etc. should be excluded (because if clicked the user will still remain on the page). What is the proper jQuery for that?
Ideally should be compatible with older jQuery - version 1.7.2