Called when user clicks on a toolbar item.
click(id, [event])

id | string, id of the toolbar item
event | object, DOM Event object

Returns undefined.

#### Description

This method is called when user clicks on the toolbar item. It is used internally, but you can use it to emulate clicks. This method emits .onClick event.
If you have toolbar defined in the following way: $('#toolbar').w2toolbar({ name : 'toolbar', items : [ { type: 'check', id: 'item1', text: 'Check', img: 'icon-page', checked: false }, { type: 'radio', id: 'item3', group: '1', text: 'R-1', img: 'icon-add' }, { type: 'radio', id: 'item4', group: '1', text: 'R-2', img: 'icon-add' }, { type: 'menu', id: 'item5', text: 'Drop Down', items: [ { id: 'id1', text: 'menu 1' }, { id: 'id2', text: 'menu 2' }, { id: 'id3', text: 'menu 3' }, ] } ] }); You can check toolbar item: w2ui['toolbar'].click('item1'); You can also click toolbar menu item: w2ui['toolbar'].click('item5:id2');