MyBB Community Forums

Full Version: How to change <li> Class Onclick
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am using dynamic drive Glossy Horizontal Menu:
http://www.dynamicdrive.com/style/csslibrary/item/glossy_horizontal_menu/

what I want to accomplish is that when I click one of the links inside the
LI element, the LI's in the UL lose their class of 'current' and the
clicked LI gains the class 'current'.

I also got a syntax, which is
$("ul.glossymenu li").bind("onclick",function(){ 
                  $("ul.glossymenu li").removeClass('current'); 
                  $(this).addClass('current'); 
}; 
); 

But I can't figure out where to put the code, Please help me solve it. Huh
I reckon with that sort of stuff it would go either in the footer or directly after the html code.
Can you tell me where to put the code exactly?
Any help? where do I paste the syntax?