replace "e.target.html()"  for "e.target.innerHTML", or as Alexandre
says: "this.innerHTML".

On Aug 31, 7:15 am, "Alexandre Plennevaux" <[EMAIL PROTECTED]>
wrote:
> Why not this?
>
>  $('[EMAIL PROTECTED]').click(function(e){
>     alert($(this).html());
>
>
>
> });
> -----Original Message-----
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
>
> Behalf Of james_027
> Sent: vendredi 31 août 2007 9:56
> To: jQuery (English)
> Subject: [jQuery] accessing html() attributes inside an event
>
> hi,
>
> I would like to do something like this ...
>
> $('[EMAIL PROTECTED]').click(function(e){
>     alert(e.target.html());
> });
>
> but it's not working ...
>
> can I avoid this ... $('[EMAIL PROTECTED]'+e.target.id+']').html()
>
> Thanks
> james
>
> Ce message Envoi est certifié sans virus connu.
> Analyse effectuée par AVG.
> Version: 7.5.484 / Base de données virus: 269.13.0/980 - Date: 30/08/2007
> 18:05- Hide quoted text -
>
> - Show quoted text -

Reply via email to