Managing active state (jQuery)
Posted
by Nimbuz
on Stack Overflow
See other posts from Stack Overflow
or by Nimbuz
Published on 2010-04-24T10:12:43Z
Indexed on
2010/04/24
10:13 UTC
Read the original article
Hit count: 242
<ul>
<li><a href="#">item 1</a></li>
<li><a href="#">item 2</a></li>
<li><a href="#">item 3</a></li>
</ul>
On click, I'd like to addclass active
to the parent li element while also removing the active
class from any other element which may be active already.
Thanks!
© Stack Overflow or respective owner