CSS vs Javascript vs JQuery drop down navigation
-
For a user / seo perspective, what is the best way to code a drop down menu nav bar? Is it best to use css, javascript or a scripting library like jquery?
I am thinking about overall best practice that will not have a negative impact on serps.
I am also thinking about what will work best on all types of devices i.e. desk tops, lap tops, smart phones and tablets.
What are the Pro's & Cons of Using CSS for Drop Down Menus.
What are the Pro's & cons of using Javascript for drop down menus.
And the same question for jquery.
Thank you all in advance for your ideas.
-
You can't go wrong with CSS. Endless styling possibilities. Also, I'd stay away from javascript because it's executed in order on the page. Meaning, if the JS doesn't load properly in the menu, the remaining JS below it wont load either.
-
Thumbs up to you too Joel and good luck with your project.
-
Seems like the seo jury has spoken and CSS it is. Thank you all for your help on this matter. Thumbs up to you all.
-
Hands down that CSS is the preferred way make dropdown menus. Google and on a lesser note, other search engines, have improved drastically with their ability to parse JavaScript / jQuery, and you may be able to get away with it, but it really should be avoided if possible. With the "new" CSS3 styles, you get almost any style you'd like with that.
-
Hi Joel,
I echo Marek's comments. However, I'm a great fan of making 100% sure that the bots can access everything that I want them to so if I'm ever in doubt I go with css and html combination as much as possible. We use Ajax and jQuery totally etc only on pages which we believe are 100% to be used primarily for user experience and engagement. E.g. When they're doing searches for specific things and the page needs to be ultra fast and efficient. However, we also try to ensure that we have crawlable pages which output the full content of a search wherever possible so that we can get the SEO benefit too. It also helps for when people have javascript disabled (not many granted).
I've seen so many ecommerce sites with great content but it's often got some kind of blockage that means a button has to be pressed or a form submitted to see it and if I'm not mistaken bots can't access this easily.
Hope this helps.
-
Hi Joel,
In my opinion CSS is "The Best". Simple, easy usage, easy changes, very good speed of page load ... etc...
As I red on many forums on the internet JQuery and JS are are available for robots, so there are no contraindications to employ them.
But
CSS - better code/text ratio (no long scripts in page code)
CSS - simple usage and changes (CSS3, HTML5)
CSS - faster loading (only simple text and html)
In my opinion, now when we have HTML5 and CSS3 there is no better way - it's innovative and simple solution,
Marek
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
-
Opencart vs. Wordpress/Woo
There are two issues facing me today. One is that my two e-commerce stores need updating after some 4 years, but I am seriously considering switching from Opencart to Wordpress/Woo. Opencart is a nightmare to work with at the best of times. Whenever I try to edit the footer of my current sites for instance nothing changes, the customisation of pages is sloppy and although the site works fine for perhaps the first 6 months, anytime after that it just slowly falls apart. Wordpress however features incredible customisation, is easy to edit the code but it lacks the backend functionality that Opencart is good at. Does anyone know the downsides of changing to Wordpress/Woo in respect to SEO?
Web Design | | moon-boots0 -
WordPress redirects are taking too long to navigate: Anyone ever faced this?
Hi community, We are using wordpress website. We have redirected hundreds of URLs from wordpress redirect manager for last 10 years around. Suddenly from last one week, the redirects are taking too long to navigate to the pages; like around 1 minute. Could you anybody face the same issue? Please help me on this. Thanks
Web Design | | vtmoz0 -
Heavy rank drop post migration
Our website has been migrated from Joomla to Wordpress at the end of 2015 and we have tasted the loss of 20% of the traffic. After an year at the end of 2016, we have relaunched the website in same word press with new theme. Again we lost n rankings and traffic. I would say ranking. Because mostly people land on our website by searching for our brand. Now we almost went invisible for "keywords" we been targeting. We have checked all the possibilities like duplicate content, redirection, alt tags, speed, canonicals, backlinks, etc..and couldn't find what is hitting us. What could be such strong factor hitting us ?
Web Design | | vtmoz0 -
Traffic Dropping To Website
Hi In Google Analytics:
Web Design | | SEOguy1
I have noticed up to 50% of traffic coming to the website drops off at the home page point,
and drops further from other pages on the site. I realise some may possibly say that this could be down to various factors such as server issues, poor web design, or the wrong traffic reaching the site I have did corrected the following: There was an issue with there being www.domain.com and www.domain.com/home, Screaming Frog and Moz showed that these both had duplicate meta tagging issues. Initially I had created a separate page called 'home' to include in the main nav bar under the slider, but yesterday I replaced this page with a request in the functions.php to place 'home' in the nav bar as a redirect back to the home www.domain.com page. This works great. So I now have the following 301 permanent redirects: non-www to www resolve in the htaccess file, plus 2 permanent 301 redirects in the nav bar. I wonder if this is acceptable protocol re the nav bar redirects, and I wonder if you could possibly advise if the actions that I have taken will have any negative impact on the web seo, link structure, crawlability or indexing. Thanks.0 -
Website organic traffic unchanged, impressions took a 98% drop in the last week.
Hi all, I have a very curious predicament and I'd be grateful if someone could shed some light on the situation. As mentioned in the title, organic traffic to our website has remained unchanged, but organic impressions have taken a 98% drop in the last week. This happened suddenly over one day; on October 22, impressions were 700, on October 23, they were 500, and on October 24 they drastically dropped to 50. The next two days they were at 22 and then up to 35. Organic traffic, however, showed the normal "weekend drop" as of October 24, and is still showing normal level (even increased a bit) continuing into this week. These are organic impressions according to Google Analytics and Google Webmaster tools. We did perform a complete site redesign a month ago. Could this be an effect from the redesign? We also noticed drop in Domain Authority, but our competitors suffered a similar (if not greater) drop as well, so we wondered if it could be due in part to the algorithm update. If anyone could shed some light on the situation I would be so appreciative! Thanks!
Web Design | | Joanne_Pendon0 -
Can google crawl text in jquery sliders?
We are redesigning our website and want to present a fair amount of text within jquery sliders. Will google crawl this text or is it treated the same way as actual script? Perhaps there is a way to just have the text as plain html but use jquery to display it?
Web Design | | Netboost0 -
Negative Margins - Image Navigation
I created a good navigation but can't replicate it with html or css so I might have to stick to images. What would you recommend as a best practice for images in navigation? This site doesn't need to rank really high, it's mostly for a portfolio.
Web Design | | BeTheBoss0 -
Switched From Wordpress, Traffic Dropped In Half
Hello, Thank you for taking a look at my issue. My site: http://www.getrightmusic.com A month ago, I switched from Wordpress to ExpressionEngine. The reason being I wanted a more powerful membership functionality with media uploading. After I switched, my traffic basically dropped in half. I was averaging around 4-6,000 unique visitors per day and now I am at about 2,000 per day. I resubmitted a new sitemap to Google webmasters. I also set up 301 redirects on my top 80 urls that were ranking well and driving traffic in Google. Not only did Google kick me off of my top spots in the SERP's, but I no longer get indexed as quickly as I used to. With the old Wordpress site I would get url's indexed within minutes. Now they aren't even getting indexed really at all. Is this a normal occurrence when switching site designs and systems? Do you think Google will just take a little time before they give me back some respect? Is there anything I should be doing to get back to ranking and getting indexed faster? Thanks for any help or any insight you may have. Jesse
Web Design | | getrightmusic0