Inserts a toolbar item or items before item with id=before.
insert(before, items)

before | string, id of the item to insert before
items | object or array, toolbar items to add

Returns undefined.

#### Description

New items will be inserted before item with id = before. If before is null, new items will be appended to the toolbar. The items argument can be either an object or array of objects. If it is an object it represents a toolbar item that will be added to .items array. If it is an array then each element of the array will be treated as a separate toolbar item object.
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' } ] }); You can insert toolbar items: w2ui['toolbar'].insert('item3', { type: 'check', id: 'item31', text: 'Check 2', img: 'icon-page' }); // or w2ui['toolbar'].insert('item3', [ { type: 'radio', id: 'item5', group: '1', text: 'Radio 5', img: 'icon-add' }, { type: 'radio', id: 'item6', group: '1', text: 'Radio 6', img: 'icon-add' }, { type: 'radio', id: 'item7', group: '1', text: 'Radio 7', img: 'icon-add' } ]);