14. Drop-Down Menus

Drop-down menus are ubiquitous on computers, both in desktop software and on the Web. They can be useful tools for organizing the hierarchy of a complex Web site by hiding deeper pages in submenus until the user needs them. This chapter demonstrates how to build a simple menu system using the MooTools JavaScript library.


The basic HTML document should be fairly unsurprising if you’ve read the previous example chapter.


It includes two important details to notice:

• The <html> tag has a class name called no-js, which you’ll use for fallback behavior in the CSS.

• The first <script> element loads the MooTools library ...

Get The JavaScript PocketGuide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.