But that would give you the href for the first A element in the document, not necessarily the one you clicked.
Going back to the OP's code, this.href would be the easiest way to get it:
$(document).ready(function() {
$("a").click(function(event) {
alert( "You clicked <http://jquery.com/>a link to " +
this.href );
return false;
});
});
-Mike
On Tue, Jan 19, 2010 at 9:14 PM, Matt Quackenbush <[email protected]>wrote:
> $("a").attr("href");
>
>

