hut-tabs
HTML UI Toolkit tabs component - Create interactive tabs in JS.
Check out the example!
Example
General Doge Kittens General boring information here... wow such tabs I can haz tabs?
var tabs = ; var myTabs = ; // Select the first tabmyTabs; // Select the kittens tabmyTabs;
JS Reference
tabs(element)
Creates a new tabs component and attaches the event handlers. It will return a
new Tabs
object. The first tab is automatically selected.
#selected
The DOM node for the currently selected .tabs-section
, or null
if no
section is selected.
#select(section)
Selects a tab section. If section
is a number, it will select the section at
that index (for example t.select(0)
will select the first section). If
section
is a DOM element, it will select the section with element. The
element must be one of the .tabs-section
elements.
Event: select(section)
Triggered when a new section is selected. section
will be the DOM node for
the selected .tabs-section
.
Styling
To change the style, change the variables defined in the variables.css
file or
override the styles with your own.