Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 3 of 3

Thread: Seeded Menu

  1. #1
    Join Date
    Feb 2005
    Posts
    1,411
    Tokens
    0

    Latest Awards:

    Default Seeded Menu

    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

  2. #2
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    i just Pmed on how that sort of navigtion works.
    To save time ill just post teh same thing here



    HTML 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>
    Jamm that in the header, its
    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
    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>
    Etc etc, you can add more lineks and sections in the same style The on onclick="SwitchMenu('sub2')"
    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)
    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>
    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.

    hope that helps, im it was done in a bit of a hurry

  3. #3
    Join Date
    Jul 2004
    Location
    Bournemouth. UK
    Posts
    3,638
    Tokens
    0

    Latest Awards:

    Default

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •