[jQuery] passing tag attribute to click handler

[jQuery] passing tag attribute to click handler


The following line of code works:
$("#updt_main img").bind("click",{ 'act':'10' }, getlastact)
The '10' is actually a class value that will be be different for each
image instance (the images are all the same).
I tried this, but it didn't work:
$("#updt_main img").bind("click",{ 'act':$(this).attr('class') },getlastact)
Is there a way I can get the class value of the clicked on img from the
event object that is passed to the getlastact handler function? If there
is, then I wouldn't need to pass the value here.
The class value is not really a class. That just seemed to be a
convenient place to store a value. Perhaps someone can suggest a better
way to associate a different value with different instances of the same
image.
The getlastact function does an ajax load that needs to pass the value
to the server.
--
"Beware of all enterprises that require new clothes, and not rather
a new wearer of clothes." -- Henry David Thoreau
Rick Pasotto rick@niof.net http://www.niof.net