CSS Tabs with Submenus

Adapted from Adam Kalsey's demo. Changes include:

How it works

JavaScript is used to set the active menu when the page first loads. It does this by comparing the current location with the href's in the menu's links. Then it uses current.indexOf(eachLink) and matches the first one. If more than one link matches the current link, then the cookie from the last clicked menu is used.

As always, send any comments via e-mail to the struts-menu user mailing list.

NOTE: If you do not have a location/page on your menu, the first item in the submenu is used. This menu does not currently allow for dynamically showing the submenu when you mouseover the tabs, but this could probably be added easily.

View source of files used in this page:
- templates/tabs.html download
- styles/tabs.css download
- scripts/tabs.js download
View JSP Source
Back to Index