I have a vertical menu. It is .glossymenu . The menu item is accessed using css as .glossymenu a.menuitem . I want to change the background color when the menu item is selected or when the menu item is active. I am trying to use the following JQuery:
$(".glossymenu a.menuitem").click(function(){
$(this).siblings(".active").removeClass("active");
$(this).addClass("active");
});
But, I am unable to resolve my issue using this. Any ideas, how to change the background color of the menu item, when it is selected. It should not change when we click outside the menu item in blank area, when the menu is active.
My HTML code for the menu is as follows: <div class="glossymenu"> <a class="menuitem" href="#">Home</a> <a class="menuitem submenuheader" href="#">Text Pages</a> <div class="submenu"> <ul> <li><a href="#">Menus</a></li> <li><a href="">Menus</a></li>
glossymenu is the main class, menuitem is sub class for both expandable and non expandable menu's. class="menuitem submenuheader" is for the expandable classes. Thank you once again.
Bookmarks