jquery:how to get the id of anchor tag
<p>I have 2 anchor tags</p>

<pre><code>&lt;li&gt;&lt;a id="tab1" href="#tabs-1"&gt;Issue&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a id="tab2" href="#tabs-2"&gt;Change Request&lt;/a&gt;&lt;/li&gt;
</code></pre>

<p>I have the following jquery:</p>

<pre><code>$('a').click(function(event) {
                                alert($('a').attr("id"));
            });
</code></pre>

<p>What happens:
I always get "tab1" in the pop up</p>

<p>What I need:
when user clicks on an anchor tag, its id needs to be displayed in the pop up</p>
