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
-
My ranking drop after migrating to https
Hey, I have migrated my website from http to https. But, all my ranking is dropped from first page to 3 or 4 page or some keywords are disappeared. I have redirected all my urls to https and done everything properly. Please help me. My website is justinterio.com
Technical SEO | | vikrantrathore1 -
Is using outbrains legal in Googles eyes?
Is using outbrains legal in Googles eyes? I have been using outbrains and drive 1K traffic each day for 50$ is this something good? Is using outbrains legal in Googles eyes?
Technical SEO | | AlexisWithers0 -
Use 302 redirect when site crashes
My company has switched to a new ecommerce platform that we are not totally familiar with yet. As we've worked with it, we've had a couple situations where both the front and back ends of our site crashed simultaneously (always after installing a third party module). The platform's built-in backup solution hasn't been an option in those situations so we've been coming up with alternatives. We now have a duplicate of the site on our server for such emergencies. The plan is to have pages on the broken site point to the backup site using 302 redirects until the broken site is fixed. Is this correct usage of the 302 redirect? I often see people recommend to never use 302 redirects, but I thought this might be the kind of situation where they'd be appropriate. If so, are there other SEO considerations we should keep in mind? For example, I'm wondering if we should put canonical tags on the temporary site that point to the broken site so the broken site stays in the SE indexes.
Technical SEO | | Kyle_M1 -
Rankings drop in UK and AU but not US
After the last Panda update on Jan. 22 my rankings dropped significantly in the AU and UK but not in the US. We operate in UK and AU and not the US so if anything the rankings should be the opposite (which also obviously would be preferred) Any ideas for why this would occur?
Technical SEO | | theLotter0 -
Does anyone use Ning (Custom social site)?
We just got a custom Ning site developed and the second we moved it to our domain, we lost almost all of our rankings in Google. So, we sign up for a SEOMoz Pro account and within a week we see that we have over 6,000 errors and warnings on our site. Duplicate content, duplicate page titles and pages with too many links. Is anyone using Ning and successfully maintaining 1st page rankings in Google? Seems to me that we need hundreds of fixes and modifications in the code of our site to fix all of these errors and get Google to take our penalizations off.
Technical SEO | | danlok0 -
Redirected Subdomain Development URLs Showing In SERPs?
I develop client websites within a subdomain of another website (with noindex, nofollow so that incomplete websites on the wrong domains aren't ever seen by web users). Then, when we launch a client's site on their own domain, we redirect all of the development URLS to the appropriate page on the new live site. (meaning at site launch, all pages on http://client-site.developersite.com would be set to 301 redirect to identical pages pages on http://www.client-site.com). This system has always seemed to work fine, but today I discovered 94,700 pages indexed by Google on my root domain and found that these were mostly old URLs of sites in development that redirect to the actual client sites. Many are several years old. Any idea why Google would be indexing these pages? Thanks in advance!
Technical SEO | | VTDesignWorks0 -
Rankings Dropped Dramatically
Hi All, I need some advice on this one, one of our websites is performing very badly and I am lost to know why. We migrated from an old website www.myclient.co.uk and re-directed to www.myclient.com. The issue we had was that the old site relied on search results i.e. www.myclient.co.uk/search+villas+in+marbella However most ranked url's were not as tidy as the example above and had lots of characters. Because of this and the fact that all incoming links were to the homepage we do not carry out any 301 re-directs. In some keywords we have increased our rankings but for others we have dropped dramatically. keyword 1 4th Jan position 22 9th Jan position 90 keyword 2 4th jan position 34 9th jan position 89 keyword 3 4th jan position 12 9th jan position 16 (a smaller drop than the others) We do have some top 10s for this domain so I don't think we have been penalised for anything but I am shocked to see such drops in rankings. I have setup the website so that each page targets different keywords and I have checked and they get A grades within SEOmoz. Any advice would be really appreciated, as the client is not too happy at the moment. Many thanks Andy
Technical SEO | | iprosoftware0 -
Is anyone using Media Temple?
I'm looking to move 5 of my sites from Hostgator's shared servers to Media Temple's dedicated virtual servers. Anyone have experience with (mt)? I'm planning on adding a few more sites this year and several things they offer are attractive to me: A (virtually) dedicated environment: Faster websites, better user experience, plus I like having some control over my site's resources Scalability: I can add more resources easily (although not super cheap) Unique control panels for each site: More control for my tech savvy clients. Unique IPs for $1 a month: More linkjuice between my related sites. $50/month is a big jump from my $12/month Hostgator account but I'm thinking it will be worth it. Am I on the right track or is this a fool's errand?
Technical SEO | | AaronParrish0