Tabbed Content / Posts /

Active Tab Color In Nav menu

3

Hey,
 I m trying to change the color of a Tab , which should change if clicked and should remain the same until the tab is changed and then it should apply the same for other tabs...

HOME | ABOUT | CONTACT 

when i hover the tabs they change color,...also if i click they change color but as i remove the cursor from over them the color changes to default color...
where as i want it to remain same...

MY CSS:

ul#menu li a:hover {

background-color:#5cbf2a;

}

ul#menu li a:active{

background-color:#62ee1b;

}


Mustafa  8 years ago   viewed: 15326    

1 Answer

0

If you are using Menucool's Responsive Tabs, it will be much easier as it has equipped with a callback handler:

function onTabSelected(tab, panelId) {

    tab.style.backgroundColor = "yellow";

}

Tabbed Content doesn't seem to have that handler. Maybe you can try adding the event handler to the tab's HTML markup: 

<li onclick="this.style.backgroundColor='yellow'">...</li>

I didn't test it. You can try it out and post back if it works.

David   8 years ago

   

Your name*
Password
(Optional. Used to modify this post afterwords)
+ =  

Ask your Own Question

  • If your question is related to the topic of this post, you can post your question to this page by clicking the "Post a reply" button at left;

  • When you want to start a new page for your question: