I have a global function to capture clicks.
$(document).click(function(e){ //do something if(clickedOnLink) //do something });
I want t
Updated: You could check if the target is an a or if a parent is an a.
$(function () { $(document).on('click', function (e) { $target = $(e.target); if ($target.closest('a').length > 0) { alert('i am an a'); } }); });
http://jsfiddle.net/8jeGV/4/