On habbox when u click on staff it brings down some links how do i make my menu so when u click on radio it brings down the links i choose.
Please reply if u no wot i am on about.
Matt
On habbox when u click on staff it brings down some links how do i make my menu so when u click on radio it brings down the links i choose.
Please reply if u no wot i am on about.
Matt
i just Pmed on how that sort of navigtion works.
To save time ill just post teh same thing here
Jamm that in the header, itsHTML Code:<script type="text/javascript"> if (document.getElementById){ document.write('<style type="text/css">\n') document.write('.submenu{display: none;}\n') document.write('</style>\n') } function SwitchMenu(obj){ if(document.getElementById){ var el = document.getElementById(obj); var ar = document.getElementById("masterdiv").getElementsByTagName("span"); if(el.style.display != "block"){ for (var i=0; i<ar.length; i++){ } el.style.display = "block"; }else{ el.style.display = "none"; } } } </script>
Is the javascript needed. Then You need the code.
Its basicly done by a bit of dhtml. and the onclick command
put this where you wnat it to go
Etc etc, you can add more lineks and sections in the same style The on onclick="SwitchMenu('sub2')"HTML Code:<div id="masterdiv"> <div class="menutitle" onclick="SwitchMenu('sub1')"> Title One</div> <span class="submenu" id="sub1"> <a href="URL"> link </a><br> <a href="URL"> link </a><br> </span> <div class="menutitle" onclick="SwitchMenu('sub2')"> Title 2 </div> <span class="submenu" id="sub2"> <a href="URL" > link </a><br> <a href="URL" > link </a><br> </span> <div>
is basily telling it wether to show or hide the links in the span tag.
Final Part to do, is the CSS
Were we define menutite and submenu
(put this in header aslo)
Athogh the css clours are still those from my site u can put them as anything u wnat, also its advible to ad teh normal css bits as well, to define the linsk colours etc.HTML Code:<style> .menutitle{ cursor:pointer; margin-bottom: 12px; background-color:#EDEDED; color:#000000; width:95%; padding:4px; text-align:left; font-weight:bold; border:0px solid #999999; } .submenu{ margin-bottom: 0.5em; text-align: left; } </style>
hope that helps, im it was done in a bit of a hurry
I got this from dynamic drive and edited it
Click Here
Hope it kinda helps
:eusa_shif
REMOVED
Edited by jesus (Forum Super Moderator): Please do not have text in your signature which is over size 4.
Want to hide these adverts? Register an account for free!