1) Install the JQuery Tools module.
2) Add the following to your Global Metadata (found under Site Admin):
Code: Select all
{JQueryTools action=incjs}
{JQueryTools action=ready}
{literal}
<__script__ type='text/javascript'>
function mainmenu(){
$(" #primary-nav ul ").css({display: "none"}); // Opera Fix
$(" #primary-nav li").hover(function(){
$(this).find('ul:first').css({visibility: "visible",display: "none"}).show(400);
},function(){
$(this).find('ul:first').css({visibility: "hidden"});
});
}
$(document).ready(function(){
mainmenu();
});
</__script>
{/literal}
I only have this on my development server, and have not done any cross-browser testing, but it works great on Firefox 7.0.1. I will try to publish an example someday. My apologies if this has been done before, possibly better, by someone else, but I've been working with cmsms for a long time, and haven't had the opportunity to contribute very much. Wanting to give something back to a great community.
Thanks to script by “Kriesi” Budschedl at http://www.kriesi.at/archives/create-a- ... via-jquery for the basic jQuery script, and CalGuy and Nuno's great JQuery Tools module.