Hi, I created a tab which basically acts as “add new tab” button. I attached a function to onSelect event which checks if this “add” tab is clicked. If so, it creates a new tab, and sets the new tab active. The code is like following –
tabbar.attachEvent(“onSelect”, function(id) {
if (id == “addTab”) {
tabbar.addTab(“test”, “Test”, “100 px”, 0);
tabbar.setContentHref(“test”, “http://www.google.com”);
tabbar.setTabActive(“test”);
}
return true;
});
Problem: even though I set active tab to “test”, the active tab will be either the pseudo “addTab” tab or the original active tab depending on if the function returns true or false. Is there a way to implement this? Thanks a lot!
Technically it possible to inject some custom html element in the tabbar’s row, but they will be ignored by other content - for example if you will have too many tabs - they may be rendered over such content.
If you still interested I may provide some code snippets.