%META:TOPICPARENT{name="OATDOCIndex"}%
---+ tab.js
Provides tab functionality.
%TOC%
---++ Objects
---+++ OAT.Tab(element,options)
Creates Tab object. The element specifies a container where the tab contents will be placed.options may contain:
* *goCallback* - function to be called when tab switching occurs. Two parameters will be supplied: old index an new index.
* *onUnDock* - function to be called when tab undocks. One parameters will be supplied: tab's index.
* *onDock* - function to be called when tab docks. One parameters will be supplied: tab's index.
* *dockMode* - bool; can tabs can be undocked into standalone windows? default true. You need to include the 'windows' library.
* *dockElement* - DOM node (or ID) specifying parent node for tabs; only needed when dockMode true
* *dockWindowWidth* - Sets width of dock window
* *dockWindowHeight* - Sets height of dock window
---++ Methods
---+++ OAT.Tab.add(clicker, window)
Adds a new clicker-window pair, i.e., when the user clicks clicker, window will be shown.
---+++ OAT.Tab.remove(clicker)
Removes a clicker-window pair.
---+++ OAT.Tab.go(index)
Switches to tab, according to index.
---++ CSS classes
---+++ .tab
ToBeDone
---+++ .tab_selected
ToBeDone
---++ Example
var t = new OAT.Tab("content");
t.add("header_1","window_1");
t.add("header_2","window_2");
t.go(0);
CategoryOAT CategoryOpenSource CategoryDocumentation CategoryToBeDone