Called when user select item from context menu.
menuClick(id, index, [event])

id | string, id of the tab
index | integer, index of the item in the menu
event | object, optional, DOM Event object

Returns undefined.

#### Description

This method is called when user selects an item from the context menu. It is used internally, but you can use it to emulate context menu selection. This method emits .onMenuClick event.
If you have sidebar defined in the following way: $('#sidebar').w2sidebar({ name : 'sidebar2', img : 'icon-page', menu : [ { id: 1, text: 'Item 1' }, { id: 2, text: 'Item 2' }, { id: 3, text: 'Item 3' }, ], nodes: [ { id: 'id-1', text: 'Level 1', hidden: true }, { id: 'id-2', text: 'Level 2', expanded: true, nodes: [ { id: 'id-2-1', text: 'Level 2.1' }, { id: 'id-2-2', text: 'Level 2.2' } ]}, { id: 'id-3', text: 'Level 3' } ] }); You can click on the node: w2ui['sidebar'].menuClick('id-1', 0);