#

API Docs for: 3.10.3
Show: Inherited Protected Private Deprecated

# plugin.NodeMenuNav Class

Defined in: `node-menunav/js/node-menunav.js:348`
Module: node-menunav

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.

- Index
- Methods
- Properties
- Attributes

## 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

- _activeItem
- _activeMenu
- _blockMouseEvent
- _currentMouseX
- _firstItem
- _hasFocus
- _hideAllSubmenusTimer
- _hideSubmenuTimer
- _movingToSubmenu
- _rootMenu
- _showSubmenuTimer
- SHIM_TEMPLATE
- SHIM_TEMPLATE_TITLE

### Attributes

- autoSubmenuDisplay
- mouseOutHideDelay
- submenuHideDelay
- submenuShowDelay
- useARIA

## Methods

### `_afterActiveDescendantChange`

(

- `event`
- `menuNav`

)
protected

Defined in `node-menunav/js/node-menunav.js:1129`

"activeDescendantChange" event handler for menu's Focus Manager.

#### Parameters:

- `event` Object

  Object representing the Attribute change event.

- `menuNav` NodeMenuNav

  Object representing the NodeMenuNav instance.

### `_cancelHideSubmenuTimer`

() protected

Defined in `node-menunav/js/node-menunav.js:1018`

Cancels the timer used to hide a submenu.

### `_cancelShowSubmenuTimer`

() protected

Defined in `node-menunav/js/node-menunav.js:1000`

Cancels the timer used to show a submenu.

### `_clearActiveItem`

() protected

Defined in `node-menunav/js/node-menunav.js:805`

Clears the menu's active descendent.

### `_focusItem`

(

- `item`

)
protected

Defined in `node-menunav/js/node-menunav.js:848`

Focuses the specified menuitem or menu label.

#### Parameters:

- `item` Node

  Node instance representing a menuitem or menu label.

### `_getTopmostSubmenu`

(

- `menu`

)
Node protected

Defined in `node-menunav/js/node-menunav.js:776`

Returns the topmost submenu of a submenu hierarchy.

#### Parameters:

- `menu` Node

  Node instance representing a menu.

#### Returns:

Node: Node instance representing a menu.

### `_hideAllSubmenus`

(

- `menu`

)
protected

Defined in `node-menunav/js/node-menunav.js:981`

Hides all submenus of the specified menu.

#### Parameters:

- `menu` Node

  Node instance representing a menu.

### `_hideAndFocusLabel`

() protected

Defined in `node-menunav/js/node-menunav.js:1259`

Hides all of the submenus of the root menu and focuses the label of the topmost submenu

### `_hideMenu`

(

- `menu`
- `activateAndFocusLabel`

)
protected

Defined in `node-menunav/js/node-menunav.js:937`

Hides the specified menu.

#### Parameters:

- `menu` Node

  Node instance representing a menu.

- `activateAndFocusLabel` Boolean

  Boolean indicating if the label for the specified menu should be focused and set as active.

### `_initFocusManager`

() protected

Defined in `node-menunav/js/node-menunav.js:1037`

Initializes and updates the Focus Manager so that is is always managing descendants of the active menu.

### `_isRoot`

(

- `menu`

)
Boolean protected

Defined in `node-menunav/js/node-menunav.js:760`

Returns a boolean indicating if the specified menu is the root menu in the menu.

#### Parameters:

- `menu` Node

  Node instance representing a menu.

#### Returns:

Boolean: Boolean indicating if the specified menu is the root menu in the menu.

### `_onActiveDescendantChange`

(

- `event`
- `menuNav`

)
protected

Defined in `node-menunav/js/node-menunav.js:1109`

"activeDescendantChange" event handler for menu's Focus Manager.

#### Parameters:

- `event` Object

  Object representing the Attribute change event.

- `menuNav` NodeMenuNav

  Object representing the NodeMenuNav instance.

### `_onDocFocus`

(

- `event`

)
protected

Defined in `node-menunav/js/node-menunav.js:1149`

"focus" event handler for the owner document of the MenuNav.

#### Parameters:

- `event` Object

  Object representing the DOM event.

### `_onDocMouseDown`

(

- `event`

)
protected

Defined in `node-menunav/js/node-menunav.js:2148`

"mousedown" event handler for the owner document of the menu.

#### Parameters:

- `event` Object

  Object representing the DOM event.

### `_onHorizontalMenuKeyDown`

(

- `event`

)
protected

Defined in `node-menunav/js/node-menunav.js:1655`

"keydown" event handler for horizontal menus.

#### Parameters:

- `event` Object

  Object representing the DOM event.

### `_onKeyDown`

(

- `event`

)
protected

Defined in `node-menunav/js/node-menunav.js:2070`

"keydown" event handler for the menu.

#### Parameters:

- `event` Object

  Object representing the DOM event.

### `_onKeyPress`

(

- `event`

)
protected

Defined in `node-menunav/js/node-menunav.js:2044`

"keypress" event handler for the menu.

#### Parameters:

- `event` Object

  Object representing the DOM event.

### `_onMenuItemMouseOut`

(

- `menuItem`
- `event`

)
protected

Defined in `node-menunav/js/node-menunav.js:1495`

"mouseout" event handler for a menuitem.

#### Parameters:

- `menuItem` Node

  Node instance representing a menuitem.

- `event` Object

  Object representing the DOM event.

### `_onMenuItemMouseOver`

(

- `menuItem`
- `event`

)
protected

Defined in `node-menunav/js/node-menunav.js:1466`

"mouseover" event handler for a menuitem.

#### Parameters:

- `menuItem` Node

  Node instance representing a menuitem.

- `event` Object

  Object representing the DOM event.

### `_onMenuLabelMouseOut`

(

- `menuLabel`
- `event`

)
protected

Defined in `node-menunav/js/node-menunav.js:1407`

"mouseout" event handler for a menu label.

#### Parameters:

- `menuLabel` Node

  Node instance representing a menu label.

- `event` Object

  Object representing the DOM event.

### `_onMenuLabelMouseOver`

(

- `menuLabel`
- `event`

)
protected

Defined in `node-menunav/js/node-menunav.js:1339`

"mouseover" event handler for a menu label.

#### Parameters:

- `menuLabel` Node

  Node instance representing a menu label.

- `event` Object

  Object representing the DOM event.

### `_onMenuMouseOut`

(

- `menu`
- `event`

)
protected

Defined in `node-menunav/js/node-menunav.js:1284`

"mouseout" event handler for a menu.

#### Parameters:

- `menu` Node

  Node instance representing a menu.

- `event` Object

  Object representing the DOM event.

### `_onMenuMouseOver`

(

- `menu`
- `event`

)
protected

Defined in `node-menunav/js/node-menunav.js:1220`

"mouseover" event handler for a menu.

#### Parameters:

- `menu` Node

  Node instance representing a menu.

- `event` Object

  Object representing the DOM event.

### `_onMouseMove`

(

- `event`

)
protected

Defined in `node-menunav/js/node-menunav.js:1709`

"mousemove" event handler for the menu.

#### Parameters:

- `event` Object

  Object representing the DOM event.

### `_onMouseOut`

(

- `event`

)
protected

Defined in `node-menunav/js/node-menunav.js:1800`

"mouseout" event handler for the menu.

#### Parameters:

- `event` Object

  Object representing the DOM event.

### `_onMouseOver`

(

- `event`

)
protected

Defined in `node-menunav/js/node-menunav.js:1732`

"mouseover" event handler for the menu.

#### Parameters:

- `event` Object

  Object representing the DOM event.

### `_onVerticalMenuKeyDown`

(

- `event`

)
protected

Defined in `node-menunav/js/node-menunav.js:1509`

"keydown" event handler for vertical menus.

#### Parameters:

- `event` Object

  Object representing the DOM event.

### `_setActiveItem`

(

- `item`

)
protected

Defined in `node-menunav/js/node-menunav.js:824`

Sets the specified menuitem or menu label as the menu's active descendent.

#### Parameters:

- `item` Node

  Node instance representing a menuitem or menu label.

### `_showMenu`

(

- `menu`

)
protected

Defined in `node-menunav/js/node-menunav.js:877`

Shows the specified menu.

#### Parameters:

- `menu` Node

  Node instance representing a menu.

### `_toggleSubmenuDisplay`

(

- `event`

)
protected

Defined in `node-menunav/js/node-menunav.js:1876`

"mousedown," "keydown," and "click" event handler for the menu used to toggle the display of a submenu.

#### Parameters:

- `event` Object

  Object representing the DOM event.

## Properties

### `_activeItem`

Node protected

Defined in `node-menunav/js/node-menunav.js:576`

Node instance representing the menu's active descendent: the menuitem or menu label the user is currently interacting with.

Default: null

### `_activeMenu`

Node protected

Defined in `node-menunav/js/node-menunav.js:587`

Node instance representing the menu that is the parent of the menu's active descendent.

Default: null

### `_blockMouseEvent`

Boolean protected

Defined in `node-menunav/js/node-menunav.js:616`

Boolean indicating whether or not to handle the "mouseover" event.

Default: false

### `_currentMouseX`

Number protected

Defined in `node-menunav/js/node-menunav.js:627`

Number representing the current x coordinate of the mouse inside the menu.

Default: 0

### `_firstItem`

Node protected

Defined in `node-menunav/js/node-menunav.js:679`

Node instance representing the first item (menuitem or menu label) in the root menu of a menu.

Default: null

### `_hasFocus`

Boolean protected

Defined in `node-menunav/js/node-menunav.js:598`

Boolean indicating if the menu has focus.

Default: false

### `_hideAllSubmenusTimer`

Object protected

Defined in `node-menunav/js/node-menunav.js:669`

Timer used to hide a all submenus.

Default: null

### `_hideSubmenuTimer`

Object protected

Defined in `node-menunav/js/node-menunav.js:659`

Timer used to hide a submenu.

Default: null

### `_movingToSubmenu`

Boolean protected

Defined in `node-menunav/js/node-menunav.js:638`

Boolean indicating if the mouse is moving from a menu label to its corresponding submenu.

Default: false

### `_rootMenu`

Node protected

Defined in `node-menunav/js/node-menunav.js:566`

Node instance representing the root menu in the menu.

Default: null

### `_showSubmenuTimer`

Object protected

Defined in `node-menunav/js/node-menunav.js:649`

Timer used to show a submenu.

Default: null

### `SHIM_TEMPLATE`

String

Defined in `node-menunav/js/node-menunav.js:376`

String representing the HTML used to create the `<iframe>` shim used to prevent `<select>` elements from poking through menus in IE 6.

Default: &#34;&#60;iframe frameborder=&#34;0&#34; tabindex=&#34;-1&#34; class=&#34;yui-shim&#34; title=&#34;Menu Stacking Shim&#34; src=&#34;javascript:false;&#34;&#62;&#60;/iframe&#62;&#34;

### `SHIM_TEMPLATE_TITLE`

String

Defined in `node-menunav/js/node-menunav.js:365`

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

### `autoSubmenuDisplay`

Boolean readonly

Defined in `node-menunav/js/node-menunav.js:487`

Boolean indicating if submenus are automatically made visible when the user mouses over the menu's items.

Default: true

#### Fires event `autoSubmenuDisplayChange`

Fires when the value for the configuration attribute `autoSubmenuDisplay` 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` EventFacade
  An Event Facade object with the following attribute-specific properties added:
  - `prevVal` Any
    The value of the attribute, prior to it being set.
  - `newVal` Any
    The value the attribute is to be set to.
  - `attrName` String
    The name of the attribute being set.
  - `subAttrName` String
    If setting a property within the attribute's value, the name of the sub-attribute property being set.

### `mouseOutHideDelay`

Number readonly

Defined in `node-menunav/js/node-menunav.js:542`

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` EventFacade
  An Event Facade object with the following attribute-specific properties added:
  - `prevVal` Any
    The value of the attribute, prior to it being set.
  - `newVal` Any
    The value the attribute is to be set to.
  - `attrName` String
    The name of the attribute being set.
  - `subAttrName` String
    If setting a property within the attribute's value, the name of the sub-attribute property being set.

### `submenuHideDelay`

Number readonly

Defined in `node-menunav/js/node-menunav.js:523`

Number indicating the time (in milliseconds) that should expire before a submenu is hidden when the user mouses out of a menu label heading in the direction of a submenu.

Default: 250

#### Fires event `submenuHideDelayChange`

Fires when the value for the configuration attribute `submenuHideDelay` 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` EventFacade
  An Event Facade object with the following attribute-specific properties added:
  - `prevVal` Any
    The value of the attribute, prior to it being set.
  - `newVal` Any
    The value the attribute is to be set to.
  - `attrName` String
    The name of the attribute being set.
  - `subAttrName` String
    If setting a property within the attribute's value, the name of the sub-attribute property being set.

### `submenuShowDelay`

Number readonly

Defined in `node-menunav/js/node-menunav.js:505`

Number indicating the time (in milliseconds) that should expire before a submenu is made visible when the user mouses over the menu's label.

Default: 250

#### Fires event `submenuShowDelayChange`

Fires when the value for the configuration attribute `submenuShowDelay` 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` EventFacade
  An Event Facade object with the following attribute-specific properties added:
  - `prevVal` Any
    The value of the attribute, prior to it being set.
  - `newVal` Any
    The value the attribute is to be set to.
  - `attrName` String
    The name of the attribute being set.
  - `subAttrName` String
    If setting a property within the attribute's value, the name of the sub-attribute property being set.

### `useARIA`

Boolean readonly

Defined in `node-menunav/js/node-menunav.js:410`

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` EventFacade
  An Event Facade object with the following attribute-specific properties added:
  - `prevVal` Any
    The value of the attribute, prior to it being set.
  - `newVal` Any
    The value the attribute is to be set to.
  - `attrName` String
    The name of the attribute being set.
  - `subAttrName` String
    If setting a property within the attribute's value, the name of the sub-attribute property being set.