Tab(options)

Class Tab

new Tab(options)

Creates an instance of Tab.

Parameters:
Name Type Description
options object

options

Properties
Name Type Attributes Description
initName string <optional>

name of the default activated button

items Array.<string>

Button names to be created

sections Array.<DOMElement>

Dom elements for tab

onItemClick function <optional>

when button is clicked pass button name to function

Extends

Methods

activate(name)

activate
Activate Section & Button

Parameters:
Name Type Description
name string

button name to activate

destroy()

destroy

Inherited From:

off(type, fn)

unbind event handler

Parameters:
Name Type Description
type string

event name and selector

fn function

handler function

Inherited From:

on(aType, aFn)

Parameters:
Name Type Description
aType string | object

event name and selector string

aFn function

event handler

Inherited From:

remove()

remove

Inherited From:

trigger(…args)

trigger event

Parameters:
Name Type Attributes Description
args object <repeatable>

event name & extra params

Inherited From: