I have the following code
$(\'a\').click(function() { var url= this.href; alert(url); });
This works just fine and sure enough the returned
Lots of good answers, just wanted to add that you could also do this:
$('a').click(function(e) { alert($(this)[0].href); });