constructor
make a new instance of context menu.
new ContextMenu(menuInfo)
menuInfo
| object menuInfo { | |
| menuId: | html id of the menu |
| targetId: | id of the html element on which the context menu should be created |
| showAccessKey: | bool to show shortcut in context menu |
| beforeShowing: | function called before showing context menu. This function can update items before showing |
| items: | array of menuItems |
| } |
| object menuItem { | |
| key: | html id of the menu item |
| label: | Text of menu item |
| class: | Css class of menu item |
| fn: | function to call when the menu item is selected |
| accesskey: | shortcut key to select the menu item |
| showing: | function call to determine the css class of menu item WHEN showing menu |
| disabled: | bool to active or inactive the menu item |
| } |
right click here
