Getting the ID of the element that fired an event using jQuery
<p>Is there any way to get the ID of the element that fires an event?</p>

<p>I'm thinking something like:</p>

<pre><code>&lt;html&gt;

  &lt;head&gt;
    &lt;script type="text/javascript" src="starterkit/jquery.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript"&gt;
      $(document).ready(function () {
        $("a").click(

        function () {
          var test = caller.id;
          alert(test.val());
        });
      });
    &lt;/script&gt;
  &lt;/head&gt;

  &lt;body&gt;
    &lt;form class="item" id="aaa"&gt;
      &lt;input class="title"&gt;&lt;/input&gt;
    &lt;/form&gt;
    &lt;form class="item" id="bbb"&gt;
      &lt;input class="title"&gt;&lt;/input&gt;
    &lt;/form&gt;
  &lt;/body&gt;

&lt;/html&gt;
</code></pre>

<p>Except of course that the var <code>test</code> should contain the id <code>"aaa"</code>, if the event is fired from the first form, and <code>"bbb"</code>, if the event is fired from the second form.</p>
