![]() |
class="active" on <li>
This is not really a "How do I?" thread. Its more like a "Is it possible?" thread. :p
Anyhow. I got a site with "tabs" at the top. Like the tabs on vbulletin.org. (home, forum, mods ad chat). The thing is that I want class="active" on the forum <li> when I'm viewing the forum. and class=active on the home <li> when I view home. etc etc. Is this possible with vB? Or do I need to code something myself? Or maybe there already is a code for it which I've missed? |
Some JavaScript would work. Are you a JS coder? The idea is to add "onclick=" to each of your tabs. Set it to a JavaScript function:
onclick=myFunction(this.id); Your function now knows the id of the tab you clicked. The function would switch the "style" or "class" of that tag to "active", and to all the others to "inactive". Voila! |
Quote:
And no, I'm not a javascript coder. |
All times are GMT. The time now is 05:38 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|