addOption
adds a new option to the control
void addOption(id id,any value, [boolean show,number index] );
id | ID of the new option | | value |
any | value of the new option | | show |
boolean | makes the newly added option active. 'false' by default | | index | number | position 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
Join Our Forum
We've retired comments here. Visit our forum for faster technical support,
connect with other developers, and share your feedback there.