It seems like a lifetime ago I first saw that javascript that does the neat "show/hide" trick. Recently I did a search to see what the latest version of that script was and there must have been a dozen different varieties. I think I liked this one the best which is a million times simpler than ones I've previously posted on this site. (I haven't really looked at those scripts in a long time, but for some reason this week alone I've needed to use it on two separate projects.) That one does a toggle:
function toggle_visibility(id) {
var e = document.getElementById(id);
if(e.style.display == 'none')
e.style.display = 'block';
else
e.style.display = 'none';
}
I actually split it so that I could do a separate show/hide:
function show(menuName) {
var el = document.getElementById(menuName);
el.style.display = 'block';
}
function hide(menuName) {
var el = document.getElementById(menuName);
el.style.display = 'none';
}