reyna12
06-11-2007, 04:00 PM
Current code is
function toggleMenu(objID) {
if (!document.getElementById) return;
var ob = document.getElementById(objID).style;
ob.display = (ob.display == 'block')?'none': 'block';
}
<ul>
<li onClick="toggleMenu('manufacturer8')"><a href="#">man 8</a></li>
</ul>
<div id="manufacturer8" class="mL">
<ul>
<li><a href="#">product</a></li>
</ul>
</div>
I would like it so when you click one of the menu items like man 8 the other open menu item like man 4 closes, at the moment you click them all and they all stay open and it scrolls down the page too much. Any ideas?
function toggleMenu(objID) {
if (!document.getElementById) return;
var ob = document.getElementById(objID).style;
ob.display = (ob.display == 'block')?'none': 'block';
}
<ul>
<li onClick="toggleMenu('manufacturer8')"><a href="#">man 8</a></li>
</ul>
<div id="manufacturer8" class="mL">
<ul>
<li><a href="#">product</a></li>
</ul>
</div>
I would like it so when you click one of the menu items like man 8 the other open menu item like man 4 closes, at the moment you click them all and they all stay open and it scrolls down the page too much. Any ideas?