1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How do i do this- drop down content

Discussion in 'HTML & Website Design' started by login, Aug 19, 2007.

  1. #1
    Please take a look at this, down on the page you will see thw word "Referanser":
    pasienthandboka.no/default.asp?mode=document&documentid=1745

    Click "Referanser" and some new content shows. This new content shows in the source code even before clicking "Referanser".

    I want use this feature in a menu, how can I do that ?
     
    login, Aug 19, 2007 IP
  2. VimF

    VimF Well-Known Member

    Messages:
    307
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    118
    #2
    The javascript:
    
    function toggleMenu() {
    	var oMenu = document.getElementById("item");
    	if(oMenu.style.display == "none")
    		oMenu.style.display = "block";
    	else
    		oMenu.style.display = "none";
    }
    
    Code (markup):
    And the html:
    
    <ul>
    	<li onclick="toggleMenu();">Menu</li>
    	<li id="item" style="display:none;">
    		<ul>
    			<li>Item 1</li>
    			<li>Item 2</li>
    			<li>Item 3</li>
    		</ul>
    	</li>
    </ul>
    
    Code (markup):
     
    VimF, Aug 19, 2007 IP
    login likes this.
  3. login

    login Notable Member

    Messages:
    8,849
    Likes Received:
    349
    Best Answers:
    0
    Trophy Points:
    280
    #3
    Thanks VimF. That did it. Great that you help me !! Green to you.

    One more thing please. I want to use this on several menus beneath each other, but it will just work on one. What variables do I have to change?

    So I suppose in this case the SE`s can read the links even if its not pulled down ?
     
    login, Aug 19, 2007 IP