YUI Library Examples: TabView Control: Removing Tabs

TabView Control: Removing Tabs

This demonstrates how to dynamically remove tabs from a TabView widget.

Tab One Content

Tab Two Content

Tab Three Content

Removing Tabs from a TabView

Dynamically removing tabs from a YUI TabView widget is done with the removeTab method.

The first thing we need to do is load the TabView source files and dependencies:

We will create a <div> called demo and include the TabView markup:

Next, create an instance of TabView from our demo element:

Next we will write a function that removes the active tab:

This is a basic example of the TabView's addTab method.

YUI Logger Output:

Note: You are viewing this example in debug mode with logging enabled. This can significantly slow performance.

Reload with logging
and debugging disabled.

More TabView Control Resources:

Copyright © 2007 Yahoo! Inc. All rights reserved.

Privacy Policy - Terms of Service - Copyright Policy - Job Openings