Got it ..., thanks all

On Wed, Jan 20, 2010 at 1:22 PM, Michael Geary <[email protected]> wrote:

> 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");
>>
>>
>


-- 
Adi Gunanta Sembiring
Blog: http://adisembiring.wordpress.com
YM: [email protected]
GTalk: [email protected]
e-mail: [email protected]
Facebook: [email protected]
HP: +62 852 6892 4259

Reply via email to