Select-and-Go Navigation

You’ve probably seen lots of examples of the standard navigation menu on the Web; you pick a choice from a menu and click a Go button, which takes you to your destination. For example, many online stores use such menus to move you to different departments. But with a bit of JavaScript, you can launch users on their way with just the menu choice, eliminating the Go button (Figure 7.1).

Figure 7.1. Picking any of the choices in this menu jumps you directly to the page containing that topic, without requiring a separate Go button.

This makes your site feel snappier and more responsive, which is always a good idea. We ...

Get JavaScript and Ajax for the Web: Visual QuickStart Guide, Seventh Edition 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.