getSubMenu

gets the submenu object of a menu item (if any)

object getSubMenu(string| number id);

Parameters

idstring| numbermenu item ID

Returns

objectobject of a child menu (submenu), if any

Example

$$("mymenu").getSubmenu(id);

Related samples

Details

The method helps retrieve properties of submenu items:

$$("mymenu").attachEvent("onItemClick", function(id){
    var submenu = this.getSubMenu(id);
    if(submenu) 
        //returns text value of a clicked menu item
        webix.message("Click: " + submenu.getItem(id).value);
});
See also
  • API
  • Articles
  • Back to top
    If you have not checked yet, be sure to visit site of our main product Webix web control library and page of context menu product.