Methods
initTabGroup(panes)
Initializes a new tab group from the given tab pane collection.
This function cycles through the given tab pane DOM nodes, extracts their tab IDs, titles and active states, renders a corresponding tab menu and prepends it to the tab panes common parent DOM node.
The tab menu labels will be set to the value of the data-tab-title attribute of each corresponding pane. The last pane with the data-tab-active attribute set to true will be selected by default.
If no pane is marked as active, the first one will be preselected.
| Name | Type | Description |
|---|---|---|
panes | Array.<Node> | | A collection of tab panes to build a tab group menu for. May be a plain array of DOM nodes or a NodeList collection, such as the result of a |
isEmptyPane(pane) → {boolean}
Checks whether the given tab pane node is empty.
| Name | Type | Description |
|---|---|---|
pane | Node | The tab pane to check. |
Returns true if the pane is empty, else false.
- Type:
- boolean