addOption

add a new option (tab) to the tabbar

void addOption(id id,any value, [boolean show,number index] );
ididID of the new option
valueanyvalue of the new option
showbooleanmakes the newly added option active. 'false' by default
indexnumberposition to insert to. Last, by default

Example

$$("tabs").addOption(10, "New title", true);

Related samples

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 (object) - 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);
See also
Back to top