Extends: Jx.Menu.Item
Implements: Jx.AutoPosition, Jx.Chrome
A sub menu contains menu items within a main menu or another sub menu.
The structure of a SubMenu is the same as a Jx.Menu.Item with an additional unordered list element appended to the container.
Copyright © 2008, DM Solutions Group Inc.
This file is licensed under an MIT style license
| Jx. | Extends: Jx.Menu.Item |
| Properties | |
| subDomObj | {HTMLElement} the HTML container for the sub menu. |
| owner | {Jx.Menu or Jx.SubMenu} the menu or sub menu that this sub menu belongs |
| visibleItem | {<Jx.MenuItem>} the visible item within the menu |
| items | {Array} the menu items that are in this sub menu. |
| Constructor | |
| Jx. | Create a new instance of Jx.SubMenu |
| Functions | |
| setOwner | Set the owner of this sub menu |
| show | Show the sub menu |
| hide | Hide the sub menu |
| add | Add menu items to the sub menu. |
| insertBefore | Insert a menu item before another menu item. |
| remove | Remove a single menu item from the menu. |
| deactivate | Deactivate the sub menu |
| isActive | Indicate if this sub menu is active |
| setActive | Set the active state of the Jx.Menu that contains this sub menu |
| setVisibleItem | Set a sub menu of this menu to be visible and hide the previously visible one. |
{Jx.Menu or Jx.SubMenu} the menu or sub menu that this sub menu belongs
isActive: function()
Indicate if this sub menu is active
{Boolean} true if the Jx.Menu that ultimately contains this sub menu is active, false otherwise.
setActive: function( isActive )
Set the active state of the Jx.Menu that contains this sub menu
| isActive | {Boolean} the new active state |
setVisibleItem: function( obj )
Set a sub menu of this menu to be visible and hide the previously visible one.
| obj | {Jx.SubMenu} the sub menu that should be visible |
Set the owner of this sub menu
setOwner: function( obj )
Show the sub menu
show: function()
Hide the sub menu
hide: function()
Add menu items to the sub menu.
add : function()
Insert a menu item before another menu item.
insertBefore: function( newItem, targetItem )
Remove a single menu item from the menu.
remove: function( item )
Deactivate the sub menu
deactivate: function( e )
Indicate if this sub menu is active
isActive: function()
Set the active state of the Jx.Menu that contains this sub menu
setActive: function( isActive )
Set a sub menu of this menu to be visible and hide the previously visible one.
setVisibleItem: function( obj )