Tab() constructor

About the constructor

Tab(imageAlt, image, divId, title)

imageAlt = the icon alt description

image = Image URL (required)

divId = ID used for the divs. (required, no spaces allowed)

title = Title used for the tab page

Example:

const myTab = new Tab('Hello World', 'https://hello.world/helloworld.png', 'hello-world', 'Hello World');

Functions

Tab.buildDiv(inner) (Mandatory function)

inner = the content used for the innerHTML property of the container. Mandatory field!

Use case

const myTab = new Tab('Hello World', 'https://hello.world/helloworld.png', 'hello-world', 'Hello World');
myTab.buildDiv(`
    <h2>Hello World!</h2>
    <p>Some Stuff!!!</p>
`)

Last updated