The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Technical SEO Issues
    4. Developing a drop down menu: Do I use javascript or pure css?

    Developing a drop down menu: Do I use javascript or pure css?

    Technical SEO Issues
    2 2 1.2k
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • seozachz
      seozachz last edited by

      I am developing a drop down menu and am trying to decide if using javascript instead of just css is worth it.

      I've done some research on the topic and the opinions seem dated.  I know that at one time not using javascript for a drop down menu was important but now less so.  Google constantly says that they will not discount the links just because they are not shown until javascript is ran.

      What I want to know is has anyone discovered from testing that using javascript instead of css for a drop down makes a difference?

      Note: the links will not be located in an external javascript file.

      1 Reply Last reply Reply Quote 0
      • PaulKMia
        PaulKMia last edited by

        Hey Zachary!

        It's a good idea to use pure css menus when the design and functionality are the same as using a menu with javascript AND the actual menu items are in a clean

        html list (not delivered through the JS). But keep in mind that cross-browser functionality can be an issue with pure css menus. Internet Explorer is a real problem in this regard.

        As for SEO, I doubt inline javascript that adds functionality to a clean html list will make search engines burp. We used to worry a lot about that like 5 years ago because JS used to cause slow load times, but nowadays the Internet is a lot faster, servers are faster, caching is better, etc... All the same, it's good coding practice to remove inline JS from HTML.

        If you want something fast and cross-browser supported look for jquery menus. There are free samples all over the place and they are brilliantly fast and you can list your menu items in a plain html list (the important thing).

        Happy coding... - P

        1 Reply Last reply Reply Quote 1
        • 1 / 1
        • First post
          Last post
        • First Link Priority - Drop Down Menu
          RobCairns
          RobCairns
          0
          2
          203

        • Images, CSS and Javascript on subdomain or external website
          JordanLowry
          JordanLowry
          0
          2
          1.4k

        • How can I use MOZ to investigate a my recent drop in domain authority?
          MattRoney
          MattRoney
          0
          3
          123

        • Using Javascript to Display Responsive Images?
          canterburry
          canterburry
          0
          3
          110

        • Too Many On-Page Links - caused by a drop down menu
          NikolasNikolaou
          NikolasNikolaou
          0
          3
          530

        • Hiding Duplicate Content using Javascript
          MagicDude4Eva
          MagicDude4Eva
          0
          3
          531

        • Drop Down Menu - Link Juice Depletion
          bradkrussell
          bradkrussell
          1
          7
          2.5k

        • Have you used the Addthis Widget and had your rankings drop
          EGOL
          EGOL
          0
          4
          487

        Get started with Moz Pro!

        Unlock the power of advanced SEO tools and data-driven insights.

        Start my free trial
        Products
        • Moz Pro
        • Moz Local
        • Moz API
        • Moz Data
        • STAT
        • Product Updates
        Moz Solutions
        • SMB Solutions
        • Agency Solutions
        • Enterprise Solutions
        • Digital Marketers
        Free SEO Tools
        • Domain Authority Checker
        • Link Explorer
        • Keyword Explorer
        • Competitive Research
        • Brand Authority Checker
        • Local Citation Checker
        • MozBar Extension
        • MozCast
        Resources
        • Blog
        • SEO Learning Center
        • Help Hub
        • Beginner's Guide to SEO
        • How-to Guides
        • Moz Academy
        • API Docs
        About Moz
        • About
        • Team
        • Careers
        • Contact
        Why Moz
        • Case Studies
        • Testimonials
        Get Involved
        • Become an Affiliate
        • MozCon
        • Webinars
        • Practical Marketer Series
        • MozPod
        Connect with us

        Contact the Help team

        Join our newsletter
        Moz logo
        © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
        • Accessibility
        • Terms of Use
        • Privacy