Delay link event with AJAX jQuery
I’ve been working on a script recently where it would add warnings when a user clicked on certain URLs. I attached an event to a link like so (simplified):
|
1 2 3 4 5 |
$('a').each(function(){ $(this).click(function(event){ addWarningToURL($(this).attr('href')); }); }); |