Does a horizontal dropd down nav have to include Java script

Buon Giorno from pitch black 9 degres C Wetherby UK :slight_smile:

Just followed a tutorial here http://www.alistapart.com/articles/dropdowns and I notics a chunk of Javascript, heres the live result:
http://tutorial.davidclick.com/menu.html

Now my question is please:
“Do you have to have a chunk of javascript to achive horizontal drop down menus?”

Grazie Tanto,
David

[font=verdana]Drop-down menus can run purely off CSS. When Eric Meyer first brought these menus to widespread attention many years ago, they were not suitable for deployment because there were too many people using IE<=6, which didn’t support :hover on arbitrary elements, but thankfully those days are behind us.

However, there are some problems with just using CSS to activate a drop-down menu, and the first and foremost is around touch-screen usage. There is no such thing as :hover on a touch screen, so you need to come up with a plan B. There are also usability issues, even for people who have the technology there, around the accuracy needed to follow the required path (especially if you have submenus coming out to the side) and the immediacy of the effect. Many people who use drop-down menus (including here at SPF) add a layer of Javascript over the top so that, while the menu will work at a basic level without Javascript, it will work even better for people who have JS activated. This can include adding in some latency to the show/hide events or enabling click-to-show rather than hover-to-show.[/font]