That's a very nice solution, bredding. I came up with this one a while back, a bit more complex but, it allows for simpler markup:
Find the function SwitchMenu and replace it with this one:
Code:
function SwitchMenu(obj){
if(document.getElementById){
if (typeof obj!=='undefined')
var el = document.getElementById(obj);
var ar = document.getElementById("masterdiv").getElementsByTagName("span"); //DynamicDrive.com change
if(typeof obj=='undefined'||el.style.display != "block"){ //DynamicDrive.com change
for (var i=0; i<ar.length; i++){
if (ar[i].className=="submenu") //DynamicDrive.com change
ar[i].style.display = "none";
}
if (typeof obj=='undefined')
return;
el.style.display = "block";
}else{
el.style.display = "none";
}
}
}
Use this syntax for the 'dummy' menu item:
HTML Code:
<div class="menutitle" onclick="SwitchMenu()">Cool Links</div>
Bookmarks