How to highlight main menu item ising .css()
I have a main menu, then a series of sub-menus that fade-in when one of the main menu items are clicked. I want to highlight the main menu of the selected sub-menu and have done so using:
- liID = '#mainmenu' + menuID + " a";
- jQuery(liID).css("color","black");
- menucategory = menuID;
Then when you select another main menu item I wrote this to change it back:
- liID = '#mainmenu' + menucategory + " a";
- jQuery(liID).css("color","#bbb");
It all looks good, except after I've changed the color back to #bbb, I can't get the hover color to be black again. Is there a better of highlighting the menu items?
Thanks