I have this list in my HTML:
<ul>
<li class="active"></li>
<li></li>
<li></li>
<li></li>
</ul>
Here I want that only the clicked <li> should have class set as "active". Hence when someone clicks on second <li> element that should be set with class as active and the first should be removed.
How can do this using jQuery?