146
rated 0 times
[
147]
[
1]
/ answers: 1 / hits: 20363
/ 11 Years ago, tue, march 26, 2013, 12:00:00
I have a navigation that shows an active state using class=active. When a link is clicked, I need to add the active class to to the clicked link, and remove the active class from all other links.
Here's my code:
<div id=referNav>
<div id=referLink1><a href=javascript:; onClick=changeClass(); class=active></a></div>
<div id=referLink2><a href=javascript:; onClick=changeClass(); class=></a></div>
<div id=referLink3><a href=javascript:; onClick=changeClass(); class=></a></div>
</div>
Any help would be greatly appreciated!
More From » jquery