Developing a drop down menu: Do I use javascript or pure css?
-
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.
-
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
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Using 410 To Remove URLs Starting With Same Word
We had a spam injection a few months ago. We successfully cleaned up the site and resubmitted to google. I recently received a notification showing a spike in 404 errors. All of the URLS have a common word at the beginning injected via the spam: sitename.com/mono
Technical SEO | | vikasnwu
sitename.com/mono.php?buy-good-essays
sitename.com/mono.php?professional-paper-writer There's about 100 total URLS with the same syntax with the word "mono" in them. Based on my research, it seems that it would be best to serve a 410. I wanted to know what the line of HTACCESS code would be to do that in bulk for any URL that has the word "mono" after the sitename.com/0 -
My site ranking has dropped in recent 2 weeks ?
I have a quick question to ask you guys,
Technical SEO | | Mustansar
I have my site (www.webuycarstoday.co.uk) It used to rank very well for all my target keywords. But recently all keywords dropped massively. I can't seems to find a good reason of this drop. We have not change anything which may have caused such drop.
Any suggestion or advice to get into the problem. I would appreciate your kind responses.0 -
Traffic Drop in 1 month!
Hi guys, ok, i'm at the end of my line with this one, my site www.golfclothingdirect.co.uk has taken a pounding since 4th April and i'm blowed if i can find a real reason for it. Traffic has been increasing slowly in line with budget, sales were picking up, and coming into season should have been better - 24th & 25th robot had an access issue - host contacted and said there had been a site issue, but resolved and now all A OK. Sales are terrible and traffic is grinding. All comments greatly taken on board! Thanks Mark
Technical SEO | | UrbanMark0 -
Dropped to 45th spot. How to track ?
Hi.. We specialize in CMS Development and all of our keywords were spotted on 1st page always. Most of them were on #1 only. ON a weekly basis, we only post resourceful blog posts on our website . Since 2-3 months, I have seen quite some drop in traffic and today when I tried the rank status, I see the keywords have dropped to 4th or 5th page. Is there a way, I can track, what went wrong ? Where to start with ? The site always ranked good since 2 years of its start already.
Technical SEO | | mageclub0 -
Rankings drop after Panda
Hi All, My site dropped completely out of the SERPS on September 27th. I've tried everything I know to do (re-wrote all content, disavow links tool, filed DCMA complaints, de-optimized on-page content, made anchor text less aggressive, etc). Can you all please take a look at www.doctorloanusa.com and let me know what you think the problem is and how much you'd charge to help? Keywords used to be: doctor loans, physician loans. I ranked 2 or 3 for those keywords consistently for over 4 years. I know I need more content, but I feel like it's a waste of time creating it. If a thin site was the issue, wouldn't I at least rank SOMEWHERE in the 1000 results? Thanks for your consideration. At my wits end.
Technical SEO | | Cary_Forest0 -
Too many links in header menu
I'm working on a few clients who are starting to get big header menus. Their site now easily exceeds the 100 links per page recommendation. Normally I would recommend them to cut down on the links, bit in this case these sites have menus that makes navigation easier. I honestly think these menus adds value for the users. The dilemma is that I think the menus provide value from an UX standpoint, but I'm not sure from the SEO standpoint. Any recommendations to this dilemma? Some examples: http://moodsofnorway.com/no/ http://www.gmax.no/ http://www.flust.no/
Technical SEO | | Inevo0 -
Do web pages have to be linked to a menu?
I have a situation where people search for terms like, say 1978 one dollar bill. Even though there never was a 1978 one dollar bill. I want to make a page to capture these searches but since there wasn't such a thing as a one dollar bill I don't want it connected to the rest of my content which is reality based. Does that make sense? Anyway, my question is, can I publish pages that aren't linked to my menu structure but that will be searchable or, am I going to have to figure out a way to make these oddball pages accessible through my menu?
Technical SEO | | Banknotes0 -
What keywords should i be using to promote my site
Hi i am looking to promote my home page which is a lifestyle magazine www.in2town.co.uk and i am not sure what keywords i should be using to promote it. I am doing ok for the keyword lifestyle magazine but i am struggling on what other keywords i should be using to get people to the home page of the magazine. The magazine is nearly finished and we still have a couple of finishing touches to do but the basics of the magazine is as follows holiday and travel news, soap gossip, celebrity gossip, product reviews, lingerie brands, gastric band hypnotherapy, health, fashion and beauty and holiday reviews. I want the home page to be the main page where everyone visits but i am not sure what i should be doing to accomplish this. Any ideas would be of a great help
Technical SEO | | ClaireH-1848860