HTML: multiXPandMenu
Patrick Brosset (contact me)
This class can create multi-level hierarchical menus based on a list of menu items and submenu items using DHTML.
The items organized in the generated menu can be expanded and collapsed dynamically using Javascript, that is when the user clicks on a menu item, all corresponding submenu items are shown, or hidden if already visible.
A good example of what it looks like is the list of documents and directories in the left frame of the Microsoft Windows Explorer.
The class provides means to create a root menu item and then add sub-nodes to it. To create more levels, it can add sub-nodes inside other sub-nodes. The menu may be arbitrarily deep.
The HTML code generated is only based on <UL> tags and is compatible with all browsers.
The generated menu is fully customizable using CSS. You may write your own CSS style definitions to configure the look and feel of parents and children menu items'.
The class also lets you define an image to use as the expand and collapse box. This is optional but can be handy to make the menu easier to understand.
| Utility
| Consistency
| Docs
| Examples
| Tests
| Videos
| Overall
| Rank
|
| Good (96.6%)
| Good (94.3%)
| Good (83.0%)
| Good (93.2%)
| -
| -
| Sufficient (75.3%)
| 40 |
Click here for detailed information about this class on phpclasses.org
Icon
Windows-style document icon
Example
Complex usage example
Example
Example file to learn how to create a menu dynamically from a multiple array of links
Example
Learn how to save the generated code to reuse it later
Example
Learn how to save the state of your menu in order to re-display it as is on another page
Example
Simple usage example
Class
A simple file loader / writer used by the xPandMenu class to save the generated code
Icon
Windows-style closed directory icon
Icon
Windows-style open directory icon
Data
CSS file to stylize the menu
Data
External javascript file for dynamic actions