Called when user right clicks the node.
contextMenu(id, [event])

id | string, id of the tab
event | object, optional, DOM Event object

Returns undefined.

#### Description

This method is called when user right clicks on the node. It is used internally, but you can use it to emulate right clicks. If .menu property is defined a context menu will be displayed. This method emits .onContextMenu event.
If you have sidebar defined in the following way: $('#sidebar').w2sidebar({ name : 'sidebar', img : 'icon-page', 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'].contextMenu('id-1');