I have a global function to capture clicks.
$(document).click(function(e){ //do something if(clickedOnLink) //do something });
I want t
You can try to see if the element you clicked on either is or is a child of an tag.
$(document).click(function(e){ if($(e.target).closest('a').length){ alert('You clicked a link'); } else{ alert('You did not click a link'); } });