Inserts a tab or tabs before tab with id=before
insert(before, tabs)

before | string, id of tab to insert before
tabs | object or array, tab or array of tabs

Returns undefined.

#### Description

New tabs will be inserted before tab with id = before. If before is null, new tabs will be appended at the end. The tabs argument can be either an object or array of objects. If it is an object it represents a tab that will be added to .tabs array. If it is an array then each element of the array will be treated as a separate tab object.
If you have tabs defined in the following way: $('#tabs').w2tabs({ name: 'tabs', active: 'tab1', tabs: [ { id: 'tab1', text: 'Tab 1' }, { id: 'tab2', text: 'Tab 2' }, { id: 'tab3', text: 'Tab 3' }, { id: 'tab4', text: 'Tab 4' } ] }); You can add tabs: w2ui['tabs'].insert('tab3', { id: 'tab5', text: 'Tab 5' }); // or w2ui['tabs'].insert('tab3', [ { id: 'tab6', text: 'Tab 6' }, { id: 'tab7', text: 'Tab 7' }, { id: 'tab8', text: 'Tab 8' } ]);