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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.