new ContextMenuItem(text, contextMenu, clickFunction)
Parameters:
Name | Type | Description |
---|---|---|
text |
string | text on the button |
contextMenu |
ContextMenu | instance of the ContextMenu this item belongs to |
clickFunction |
function | callback function that will be called when user clicks this item |
Members
-
$el :jQuery.element
-
jQuery element representing DOM content of this menu item
-
$submenu :jQuery.element
-
jQuery element containing the submenu (or undefined, if item has no subitems)
-
appInstance :App
-
instance of App this menu belongs to
-
contextMenu :ContextMenu
-
instance of the ContextMenu this item belongs to
-
itemCount :Number
-
submenu item counter
-
jQuery
-
get jQuery element of this menu item
-
length
-
number of items in the submenu
-
text :string
-
text on the button
Methods
-
addClass(cls)
-
add a CSS class to this item
Parameters:
Name Type Description cls
string [description]
-
appendItem(item)
-
append a nested ContextMenuItem to this item
Parameters:
Name Type Description item
ContextMenuItem item that will be appended