P
Paul Bruneau
Hi Everybody,
I've adapted a tutorial to make my own navigation menu.
Its an "Expanding/Contracting" kind of menu that looks
neat and simple and a toggle to "Expand/Contract" any
of the menu-chains works fine...
Problem is... I need to control "when" any of the menus
is in an "Expand/Contract" mode. Otherwise, a menu script
isn't worth diddly.
I thought... Contract them all, and then just Expand the
single one I want to.
This would be the pseudo-script. Will someone help me
javascript it? I really don't understand javascripts For logic.
I've named the ID for each menu-chain "m1", "m2", "m3"
so that I could do this loop
Function MainMenu(list)
{
FOR x = 1 to 15
document.getElementById('m'+x).style.display='none'; // Closes the menu-chain
Next x
document.getElementById(list).style.display='block'; // Opens the menu-chain by name
}
Many thanks
Paul
I've adapted a tutorial to make my own navigation menu.
Its an "Expanding/Contracting" kind of menu that looks
neat and simple and a toggle to "Expand/Contract" any
of the menu-chains works fine...
Problem is... I need to control "when" any of the menus
is in an "Expand/Contract" mode. Otherwise, a menu script
isn't worth diddly.
I thought... Contract them all, and then just Expand the
single one I want to.
This would be the pseudo-script. Will someone help me
javascript it? I really don't understand javascripts For logic.
I've named the ID for each menu-chain "m1", "m2", "m3"
so that I could do this loop
Function MainMenu(list)
{
FOR x = 1 to 15
document.getElementById('m'+x).style.display='none'; // Closes the menu-chain
Next x
document.getElementById(list).style.display='block'; // Opens the menu-chain by name
}
Many thanks
Paul