[jQuery] Reference to the element that triggered the event

[jQuery] Reference to the element that triggered the event

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1250">
<META content="MSHTML 6.00.2900.3059" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=093401600-13032007><FONT face=Arial size=2>Sorry if this is a
really thick question, but I've hunted for over an hour on the
website/Google/anywhere to find this and am getting
nowhere.....</FONT></SPAN></DIV>
<DIV><SPAN class=093401600-13032007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=093401600-13032007><FONT face=Arial size=2>I have the following
code:</FONT></SPAN></DIV>
<DIV><SPAN class=093401600-13032007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=093401600-13032007><FONT face=Arial
size=2>  $("*.selectable").click( function(e)
{<BR>   $(this).toggleClass("selected"); </FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=093401600-13032007><FONT face=Arial
size=2>   saveCookie($(this).attr("id"),
$(this).attr("class").indexOf("selected"));<BR>  });
</FONT></SPAN></DIV>
<DIV><SPAN class=093401600-13032007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=093401600-13032007><FONT face=Arial size=2>which works
fine.</FONT></SPAN></DIV>
<DIV><SPAN class=093401600-13032007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=093401600-13032007><FONT face=Arial size=2>But I want to know
which element within *.selectable was actually clicked (eg an anchor, an image
etc).....</FONT></SPAN></DIV>
<DIV><SPAN class=093401600-13032007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=093401600-13032007><FONT face=Arial size=2>How do I do
that?<BR><BR>Thanks in advance</FONT></SPAN></DIV>
<DIV><SPAN class=093401600-13032007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=093401600-13032007><FONT face=Arial
size=2>John</FONT></SPAN></DIV></BODY></HTML>
<BR>
<P><FONT SIZE=2>--<BR>
No virus found in this outgoing message.<BR>
Checked by AVG Free Edition.<BR>
Version: 7.5.446 / Virus Database: 268.18.9/719 - Release Date: 12/03/2007 08:41<BR>
</FONT> </P>
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/