hey i am trying to make this script more than 1 level deep: for example
menu1
--submenu1
----item here
--submenu2
----item here
menu2
--submenu2
----item here
now ive got it so that when i click on menu1-submenu1 the submenu 2 will collapse, and when i click on submenu2 submenu1 will collapse... but cannot figure out how to get it so that if menu1 is open and i click on menu2, menu1 will collapse... any help would be appreciated...
here is how it is currently set up:
Code:
function do_onload(){
uniqueidn=window.location.pathname+"firsttimeload"
var alltags=document.all? document.all : document.getElementsByTagName("*")
ccollect=getElementbyClass(alltags, "travbody")
statecollect=getElementbyClass(alltags, "showstate")
if (enablepersist=="on" && ccollect.length>0){
document.cookie=(get_cookie(uniqueidn)=="")? uniqueidn+"=1" : uniqueidn+"=0"
firsttimeload=(get_cookie(uniqueidn)==1)? 1 : 0 //check if this is 1st page load
if (!firsttimeload)
revivecontent()
}
if (ccollect.length>0 && statecollect.length>0)
revivestatus()
}
and here is how i have the items set up....
Code:
<div class="travhead" onClick="javascript:sweeptoggle('contract') & expandcontent(this, 'logon1') & expandcontent(this, 'logon2')& expandcontent(this, 'logon3') & expandcontent(this, 'logon4') & expandcontent(this, 'logon5') "
style="cursor:hand; cursor:pointer">START-UP</div>
<div class="travsub" id="logon1" onclick="expandcontent(this, 'slogon1')" style="cursor:hand; cursor:pointer">Log
In to Tr@veller</div>
<div class="travbody" id="slogon1">
Bookmarks