use jquery to modify class attribute
<pre><code>&lt;ul&gt;
&lt;li&gt;&lt;a class="selected"&gt;A&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a&gt;B&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a&gt;C&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>How can I remove the attribute selected from all <code>&lt;li&gt;'s</code> when one of the element is clicked and set the one being clicked to selected?</p>

<p>I'm learning jquery.</p>

<p><strong>Updated the code</strong></p>
