Disables toolbar item or items with id.
disable(id1, [id2], ...)

id | string, id of the toolbar item

Returns integer.

#### Description

The item(s) must exists in the .items array of the toolbar. The toolbar item is identified by the .id property. The method returns the number of disabled items that were enabled before.
If you have toolbar defined in the following way: $('#toolbar').w2toolbar({ name : 'toolbar', items : [ { type: 'check', id: 'item1', text: 'Check', img: 'icon-page', checked: true }, { type: 'radio', id: 'item3', group: '1', text: 'R-1', img: 'icon-add', disabled: true }, { 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 disable toolbar item: w2ui['toolbar'].disable('item3', 'item4'); You can also disable toolbar menu item: w2ui['toolbar'].disable('item5:id2', 'item5:id3');