wwsun / component-tab

A simple tab component which used to describe the OO practice of JavaScript.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Component Tab

Docs

A simple tab component which used to describe the OO practice of JavaScript.

Usage

The usage of tab-component is very easy, just new Tab(config), and pass the config object you want to set.

var tabs = document.getElementsByClassName('tab');
new Tab({
  root: tabs[0]
});

Config

The available config object is here

name type desc
root node the dom node
currentClass string the active class set for the current tab

About

A simple tab component which used to describe the OO practice of JavaScript.

License:MIT License


Languages

Language:JavaScript 61.2%Language:HTML 26.2%Language:CSS 12.5%