I am experimenting with the YUI3 TabView component. Using this example, how is it possible to disable one of the tabs (maybe using the Tab
object)? I tried to find different examples but the only few that I found only showed how to actually create the tabs.
UPDATE:
I tried the following:
tabview.item(1).disable();
but the tab is still clickable and stays in normal state although the class 'yui-tab-disabled' is added to the li-element.
UPDATE 2:
I managed to disable the second tab by using the following code:
tabview.item(1)
.disable()
.on('selectedChange', function () {
return false;
});
The question now is: How to enable the tab again?
Solved! In order for the disabling and enabling of fields to work, one must include the following code snippet after the
TabView
declaration:A full example can be viewed here.