Shouldn't it be
this.click(function(){ alert(this.attr("id");) });
??
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Mahadewa
Sent: jeudi 15 février 2007 14:14
To: [email protected]
Subject: [jQuery] Question about .each()
Hi all,
I have a question about .each construct. I have the following snippet code,
but for some reason it doesn't do what I expected it to do. Have I missed
something ?
$(".MyButton").each(function(){
this.click(function(){ alert(this.id;) });
});
Thanks for the help,
Chris
--
View this message in context:
http://www.nabble.com/Question-about-.each%28%29-tf3233682.html#a8985143
Sent from the JQuery mailing list archive at Nabble.com.
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/
--
Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.441 / Base de données virus: 268.17.39/687 - Date: 14/02/2007
16:17
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/