jquery change text according to id
<p>I am new using jQuery..</p>

<p>I have a list something like this</p>

<pre><code>&lt;ul id="abc"&gt;
&lt;li&gt;&lt;a id="sp"&gt;test&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a id="sb"&gt;test2&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>How do i change text according to id</p>

<p>i tried something like this</p>

<pre><code>    $("#abc li").click(function() {
        if($("#abc li a").attr('id') == 'sp')
            alert(111111);
    });
</code></pre>

<p>the alert never popped up.</p>

<p>What could be wrong here</p>

<p>Thank you.</p>
