plugin.NodeMenuNav Class
The NodeMenuNav class is a plugin for a Node instance. The class is used via
the plug
method of Node and
should not be instantiated directly.
Item Index
Methods
- _afterActiveDescendantChange
- _cancelHideSubmenuTimer
- _cancelShowSubmenuTimer
- _clearActiveItem
- _focusItem
- _getTopmostSubmenu
- _hideAllSubmenus
- _hideAndFocusLabel
- _hideMenu
- _initFocusManager
- _isRoot
- _onActiveDescendantChange
- _onDocFocus
- _onDocMouseDown
- _onHorizontalMenuKeyDown
- _onKeyDown
- _onKeyPress
- _onMenuItemMouseOut
- _onMenuItemMouseOver
- _onMenuLabelMouseOut
- _onMenuLabelMouseOver
- _onMenuMouseOut
- _onMenuMouseOver
- _onMouseMove
- _onMouseOut
- _onMouseOver
- _onVerticalMenuKeyDown
- _setActiveItem
- _showMenu
- _toggleSubmenuDisplay
Properties
Methods
_afterActiveDescendantChange
-
event
-
menuNav
"activeDescendantChange" event handler for menu's Focus Manager.
Parameters:
-
event
ObjectObject representing the Attribute change event.
-
menuNav
NodeMenuNavObject representing the NodeMenuNav instance.
_clearActiveItem
()
protected
Clears the menu's active descendent.
_focusItem
-
item
Focuses the specified menuitem or menu label.
Parameters:
-
item
NodeNode instance representing a menuitem or menu label.
_hideAndFocusLabel
()
protected
Hides all of the submenus of the root menu and focuses the label of the topmost submenu
_hideMenu
-
menu
-
activateAndFocusLabel
Hides the specified menu.
_initFocusManager
()
protected
Initializes and updates the Focus Manager so that is is always managing descendants of the active menu.
_isRoot
-
menu
Returns a boolean indicating if the specified menu is the root menu in the menu.
Parameters:
-
menu
NodeNode instance representing a menu.
Returns:
_onActiveDescendantChange
-
event
-
menuNav
"activeDescendantChange" event handler for menu's Focus Manager.
Parameters:
-
event
ObjectObject representing the Attribute change event.
-
menuNav
NodeMenuNavObject representing the NodeMenuNav instance.
_onDocFocus
-
event
"focus" event handler for the owner document of the MenuNav.
Parameters:
-
event
ObjectObject representing the DOM event.
_onDocMouseDown
-
event
"mousedown" event handler for the owner document of the menu.
Parameters:
-
event
ObjectObject representing the DOM event.
_onHorizontalMenuKeyDown
-
event
"keydown" event handler for horizontal menus.
Parameters:
-
event
ObjectObject representing the DOM event.
_onKeyDown
-
event
"keydown" event handler for the menu.
Parameters:
-
event
ObjectObject representing the DOM event.
_onKeyPress
-
event
"keypress" event handler for the menu.
Parameters:
-
event
ObjectObject representing the DOM event.
_onMenuItemMouseOut
-
menuItem
-
event
"mouseout" event handler for a menuitem.
_onMenuItemMouseOver
-
menuItem
-
event
"mouseover" event handler for a menuitem.
_onMenuLabelMouseOut
-
menuLabel
-
event
"mouseout" event handler for a menu label.
_onMenuLabelMouseOver
-
menuLabel
-
event
"mouseover" event handler for a menu label.
_onMenuMouseOut
-
menu
-
event
"mouseout" event handler for a menu.
_onMenuMouseOver
-
menu
-
event
"mouseover" event handler for a menu.
_onMouseMove
-
event
"mousemove" event handler for the menu.
Parameters:
-
event
ObjectObject representing the DOM event.
_onMouseOut
-
event
"mouseout" event handler for the menu.
Parameters:
-
event
ObjectObject representing the DOM event.
_onMouseOver
-
event
"mouseover" event handler for the menu.
Parameters:
-
event
ObjectObject representing the DOM event.
_onVerticalMenuKeyDown
-
event
"keydown" event handler for vertical menus.
Parameters:
-
event
ObjectObject representing the DOM event.
_setActiveItem
-
item
Sets the specified menuitem or menu label as the menu's active descendent.
Parameters:
-
item
NodeNode instance representing a menuitem or menu label.
_showMenu
-
menu
Shows the specified menu.
Parameters:
-
menu
NodeNode instance representing a menu.
Properties
_activeItem
Node
protected
Node instance representing the menu's active descendent: the menuitem or menu label the user is currently interacting with.
Default: null
_activeMenu
Node
protected
Node instance representing the menu that is the parent of the menu's active descendent.
Default: null
_blockMouseEvent
Boolean
protected
Boolean indicating whether or not to handle the "mouseover" event.
Default: false
_currentMouseX
Number
protected
Number representing the current x coordinate of the mouse inside the menu.
Default: 0
_firstItem
Node
protected
Node instance representing the first item (menuitem or menu label) in the root menu of a menu.
Default: null
SHIM_TEMPLATE
String
String representing the HTML used to create the
<iframe>
shim used to prevent
<select>
elements from poking through menus in IE 6.
Default: "<iframe frameborder="0" tabindex="-1" class="yui-shim" title="Menu Stacking Shim" src="javascript:false;"></iframe>"
SHIM_TEMPLATE_TITLE
String
String representing the value for the title
attribute for the shim used to prevent <select>
elements
from poking through menus in IE 6.
Default: "Menu Stacking Shim"
Attributes
mouseOutHideDelay
Number
readonly
Number indicating the time (in milliseconds) that should expire before a submenu is hidden when the user mouses out of it.
Default: 750
Fires event mouseOutHideDelayChange
Fires when the value for the configuration attribute mouseOutHideDelay
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added:
useARIA
Boolean
readonly
Boolean indicating if use of the WAI-ARIA Roles and States should be enabled for the menu.
Default: true
Fires event useARIAChange
Fires when the value for the configuration attribute useARIA
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added: