Hi Bensanlau,

try

$('a').click(function(){
alert(*$(this)*);
return false;
});


Chandan Luthra
Intelligrape Software Pvt. Ltd.
Josh Billings<http://www.brainyquote.com/quotes/authors/j/josh_billings.html>
- "Every man has his follies - and often they are the most interesting
thing he has got."

On Thu, Jun 11, 2009 at 15:33, Pierre Bellan <fcy...@gmail.com> wrote:

> Hi,
> I think that is because of the alert function.
> It needs a string and maybe for an anchor object, jquery introduces a
> toString method.
>
> With the console of firebug, there are no differences between anchor and
> images
>
> Pierre
>
>
> 2009/6/11 bensan...@gmail.com <bensan...@gmail.com>
>
>
>> Hi all,
>>
>> I'm confused as to why when I have:
>>
>> $('a').click(function(){
>> alert(this);
>> return false;
>> });
>>
>> the alert displays the URL defined in the href attribute, and not an
>> object.
>>
>> Yet, if i call like say an image, it returns the object.
>>
>> Thanks
>> ben
>>
>
>

Reply via email to