Documentation

addOption

add a new option (tab) to the tabbar

void addOption(id id,any value, [boolean show ,number index] );

Parameters

ididID of the new option
valueanyvalue of the new option
show booleanmakes the newly added option active. 'false' by default
indexnumberposition to insert to. Last, by default

See also

Example

function open_new_tab(id){
    var item = $$('list1').getItem(id);
    $$('tabs').addOption(item.id, item.title, true);
};

Details

In case of a tabbar, the method can as well take a more extensive option configuration of a tab.

And the parameters are as follows:

  • obj (obj) - tab configuration;
  • show (boolean) - makes the newly added option active;
  • index (number) - position to insert to. Last, by default.
tabbar.addOption({id:1, value:"New", close:true, icon:"cog"}, true);
Back to top