NF.widget.menu
(
rootNode
,
config
)
- Parameters:
-
rootNode <Node | HTML string | Node ID>The root node of the menu. Pass the parameter a Node, the id of a Node, or an HTML string. -
config <Object>Object literal specifying the configuration properties for the menu. Options include...- {showTimerMS : int} - The time (in milliseconds) between hovering over a menu item and showing the sub menu.
- {hideTimerMS : int} - When hovering over new items this is the time (in milliseconds) required to ellapse before closing the old items sub menu.
- {itemTrigger : String | Array} - Set to ("mouseover", "click") - A string or array of strings defining the event that will trigger an active state for each level of menu items starting at menu level 0. If the menu contains more levels than the array defines, the last array item trigger will be applied to the higher levels. Default is "mouseover" for all levels.
- {menuTrigger : String | Array} - Set to ("mouseover", "click", "none") - A string or array of strings defining the event that will trigger the closing of a subs child menus (occurs when an event is fired on a main or sub container itself vs. an item). When using an array, the first item defines the main menu (level 0). If the menu contains more levels than the array defines, the last array item trigger will be applied to the higher levels. Default is the value defined using the 'itemTrigger' or 'mouseover' for all levels.
- {documentTrigger : String} - Set to ("mouseover", "click", "none") - The document level event which triggers the closing of all sub menus. Default is "mouseover".
- {collapseOnClick : Boolean} - When true any active sub menus will close after clicking on a 'nfItem' menu link.
- {stickyHover : Boolean} - When true the hover styles and item animation effects remain applied while the items child sub is visible.
- {treeStyle : String} - ("standard",false) - A string indicating the stype of tree menu functionality.