Tabs

  • Requires jQuery
  • Requires tabs.js

Simple tabs management.

Overview

Foo tab
Next
Bar tab
Previous Next
Foobar tab
Previous

Settings

tabs.js contains myTab.options object with all default settings:

Global parameter Type Description
autoHide boolean Hide trigger if target tab is empty
toggleMode boolean Toggle show/hide the tab even if active

On and Off

.mod-on and .mod-off classes into [my-tab] elements are used to show/hide any elements.

Icon rotate

.my-toggle-options attribute can contain tabs options. Adding icon-rotate into .my-toggle-options attribute automatically rotate icons included into the trigger [tab-name].

Foo tab
Next
Bar tab
Previous Next
Foobar tab
Previous

Methods

myTab.update(); Start and refresh if DOM changed.

myTab.open(id); Where id is a string. Opens the specified tab name.

Foo tab
Bar tab
Foobar tab