Index | OAT homepage | OpenLink Software

# OATDOCtab

- OATDOCtab
- _ _ tab.js
- _ _ _ _ Objects
- _ _ _ _ _ _ OAT.Tab(element,options)
- _ _ _ _ Methods
- _ _ _ _ _ _ OAT.Tab.add(clicker, window)
- _ _ _ _ _ _ OAT.Tab.remove(clicker)
- _ _ _ _ _ _ OAT.Tab.go(index)
- _ _ _ _ CSS classes
- _ _ _ _ _ _ .tab
- _ _ _ _ _ _ .tab_selected
- _ _ _ _ Example

## tab.js

Provides tab functionality.

### 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 and 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);

Copyright (C) 2005-2008 OpenLink Software