Tab Strip

Rating: 4.0/5 (14 votes)

A simple tab strip control. Click the tabs to change the frame content.

Demo

General Preferences Account
General content




Preferences content




Account content




Download

Tab Strip is available under the terms of the GNU General Public License.

Source:

Global dependencies for all controls:

Usage

Unlike most of the others, this control works by transforming existing HTML content, so you are responsible to creating the HTML elements yourself and passing the parent ID to the constructor. The HTML structure should be similar to the following:

<div id="my_tabstrip"> <div> <span>Tab 1</span> <span>Tab 2</span> </div> <div> <div>Content 1</div> <div>Content 2</div> </div> </div>

This gives you better control over the display of the tabs and content through CSS. View the source of the example at the top of the page to see how the tab styling was accomplished through tabstrip.css.

Constructor:

var tabstrip = new Control.TabStrip(element, options);

Parameters:

Additional Options:

Example:

new Control.TabStrip('my_tabstrip', { activeClass: 'active', hoverClass: 'hover', disabledClass: 'disabled', disabled: ['preferences', 'account'] });