How to set the class name on click using jQuery
<p>I have this list in my HTML:</p>

<pre><code>&lt;ul&gt;
    &lt;li class="active"&gt;&lt;/li&gt;
    &lt;li&gt;&lt;/li&gt;
    &lt;li&gt;&lt;/li&gt;
    &lt;li&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>Here I want that only the clicked <code>&lt;li&gt;</code> should have class set as "active". Hence when someone clicks on second <code>&lt;li&gt;</code> element that should be set with class as active and the first should be removed.</p>

<p>How can do this using jQuery?</p>
