Try loading as AMD module or fall back to default loading
The actual widget class
Default options for the widget
items
: a selector pointing to the items
(from within the groups if specified, or the menu)Initializer function.
Enhance submenus on small devices
Add aria attributes
Attach evenets to the widget
Close opened submenus
Open submenu if any
Select the previous item
Select the next item
Select the specified item
Close the menu
Close the menu and its parents
Find the widget structure using the specified configuration
Find the menu items, specified in one of the following ways:
role="menuitem"
items
option (i.e. "id1 id2")Get the toggles for a specified item
Get the controls for the menu
Handle space key press
Handle enter key press
Handle up key press
Handle down key press
Handle left key press
Handle right key press
Handle escape key press
Handle tab key press
Cleanup the widget and remove remaining references
Install the widget into the JS library
Close all menus when exiting one...
... and do not close the menus controlled by a toggle
... and do not close parent menus or submenus when clicking a menuitem
... and do not close the mainnav menus
... and do not close parent menu
Menu
The
Menu
class provides a simple menu widget.author: Julien Ramboz version: 1.0 references: WAI-ARIA menu role, AOL's Menu style guide usage: Menu examples