Finds toolbar item with id and extends it with item object.
set(id, item)

id | string, id of the toolbar item
item | object, new toolbar item object

Returns boolean.

#### Description

The first argument id is the id of the toolbar item you used when you created toolbar items. The .items array holds all created toolbar items. The toolbar item object is not replaced with item, but extended by it. If you call this method it during run-time, you will need to call .refresh() method. If toolbar item was successfully extended the method will return true, otherwise false.
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: 'Radio 1', img: 'icon-add' }, { type: 'radio', id: 'item4', group: '1', text: 'Radio 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 get toolbar item: w2ui['toolbar'].set('item3', { text: 'check 2' }); w2ui['toolbar'].refresh(); You can also set toolbar menu item: w2ui['toolbar'].set('item5:id2', { text: 'menu 22' });