What's The Best Way to Make A Drop down menu for a website.

Discussion in 'JavaScript' started by cryptic1001, Dec 2, 2008.

  1. #1
    I'm going to make a Drop Down Menu for my website I know I have to use JavaScript, CSS and html butim not sure if there is an easy way to set it up. I know a lot of it is throw the CSS but i don't what i need for the JavaScript. If someone Could get back to me it would be great thanks!
     
    cryptic1001, Dec 2, 2008 IP
  2. dimitar christoff

    dimitar christoff Active Member

    Messages:
    882
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    90
    #2
    there are plenty of scripts that do that but in order not to damage your seo, make sure to pick one that is unobtrusive and uses a native elements structure to create the menu.

    for example, in the source you may have:

    
    <div id="menu" class="menu" style="display: none">
    <ul>
    <li><a href="">item 1</li>
    ...
    </ul>
    <ul>
    <li><a href="">dropdown 2 item 1</li>
    ...
    </ul>
    </div>
    PHP:
    by using a script that will convert the "menu" element's children into it's own you will ensure that google etc can spider all menu links correctly.
     
    dimitar christoff, Dec 2, 2008 IP
  3. cryptic1001

    cryptic1001 Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    okay thanks for the tip
     
    cryptic1001, Dec 2, 2008 IP