Be the first to write a review
A Search Engine Friendly Navigation Menu with CSS and JavaScript Part 2
Welcome to part two of this tutorial. In the first article we created an HTML based navigation menu and a CSS file to control its appearance. This article will look at creating the behaviour with some very simple JavaScript. This behaviour will ultimately make the whole menu function as we want it to. One of the benefits of this navigation menu is that the top level menu links will all still work if JavaScript is switched off on the client-side. The second level elements won’t work of course, but this doesn’t have to mean that these pages are unreachable; you can just hard code some basic links to each of the sub-pages on the ‘index’ page for each of the directories. But for those that have JavaScript switched on, we can do the whole drop-down thing.
Dan Wellman
Dan Wellman is an author and web developer based in the UK. Dan has written three books so far; the latest, jQuery UI 1.7: The User Interface Library for jQuery, was released at the end of 2009.
Dan has been writing web development tutorials for over 5 years and works by day for a local digital media agency in his home town of Southampton.