new tart.Tabs(options)
Tabs is a fully working and customizable tab panel creator class
Name | Type | Description |
---|---|---|
options |
Object |
optional
Customized initial options for tabpanel. |
Extends
- goog.pubsub.PubSub
Members
-
protectedrendered
-
State of tab panel
-
protectedtabPanelsArray.<tart.TabPanel>
-
Holds TabPanel objects associated with the tabpanel
Methods
-
addTab(tabPanel)
-
Adds a new tab to a Tabs instance.
Name Type Description tabPanel
tart.TabPanel instance that's going to be added to a Tabs instance.
-
addTabPanel(tabPanels)
-
Adds new tab to existing tab panel
Name Type Description tabPanels
Array | tart.TabPanel An array that holds instance of TabPanel Class to add new tab. Also tabPanels argument should be a tab panel instance instead of array.
-
bindTabPanelEvents(tabPanel)
-
Binds required events of tabpanel.
Name Type Description tabPanel
tart.TabPanel Tabpanel instance for binding events to it.
-
buildDOM(){jQueryObject}
-
Builds DOM elements for tabpanel and returns DOM as ready to append to a container
Returns:
Type Description jQueryObject DOM element of the Tabs instance. -
getActiveTab(){tart.TabPanel}
-
Returns the active tab object contains tab and panel elements and templates that used in tab and panel.
Returns:
Type Description tart.TabPanel The active tab. -
getTabsLength(){number}
-
Returns:
Type Description number number of tabs associated with the Tabs instance. -
initialize(renderCfg)
-
Initialize the tabpanel with calling buildDOM method
Name Type Description renderCfg
string Where to container will be appended.
-
protectedinitOptions(options)
-
Merges custom options object with defaults
Name Type Description options
Object optional Customized options for Tabs instance.
-
isRendered(){boolean}
-
Returns:
Type Description boolean The status of tabpanel, rendered or not. -
removeTab(index)
-
Removes the tab with the given index.
Name Type Description index
number Index number of the tab that you want to remove.
-
setActiveTab(index)
-
Sets the tab as active with the given index.
Name Type Description index
number Index number of the tab that you want to set as active.
-
templates_dom(){string}
-
Returns:
Type Description string Main container markup. -
templates_panelContainer(){string}
-
Returns:
Type Description string Panel container markup. -
templates_tabContainer(){string}
-
Returns:
Type Description string Tab container markup.