View Full Version : Switch Menu II... Help need please
gregwah
08-04-2005, 12:46 PM
Hello,
Is there any way to make the switch menu II script behave like the original switch menu. By this I mean any open menu automatically collapses when another menu is clicked, as at the moment to make a menu close you have to click on it again. I only want to be able to open one menu at a time to avoid scrolling problems. I am using IE6
I'm hoping this is possible and that some code wiz can point me in the right direction.
Thanks for your help
Greg
jscheuer1
08-05-2005, 01:32 AM
Yes. In the menu.js file find the function SetSlide(), at the very beginnng of that function, it looks like this:
function SetSlide()
{
if (window.TIMER_SLIDE) clearInterval(TIMER_SLIDE) //DD added codeMake it look like this:
function SetSlide()
{
var tmp1=OBJ_VIEW, tmp2=OBJ_SLIDE, tmp3=MainDiv
subs=document.getElementsByTagName('DIV')
for (i = 0; i < subs.length; i++)
if (subs[i].className=='subMenu'&&subs[i].getAttribute("state", 0)!="0"&&subs[i]!==tmp1){
OBJ_VIEW=subs[i]
OBJ_SLIDE=subs[i].parentNode
MainDiv=subs[i].parentNode.parentNode
RunSlide()
}
OBJ_VIEW=tmp1
OBJ_SLIDE=tmp2
MainDiv=tmp3
if (window.TIMER_SLIDE) clearInterval(TIMER_SLIDE) //DD added codeEnjoy!
gregwah
08-11-2005, 10:43 AM
Thanks that works ok.
Do you know if there is anyway to make the 'topItem' class go to an url when clicked?
At the moment I have:
<div class="topItem" classOut="topItem" classOver="topItemOver" onMouseOver="Init(this);"><a href="home/home.htm" target="mainFrame">Home</a></div>
But this only follows the link when the text of the menu item is clicked and not the whole 'button'
I have tried onClick=parent.mainFrame.location='home/home.htm" and other variants along those lines but to no avail
Any help would be greatly appreciated
Thanks Greg
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.