container element
Destroy tab instance, remove all listeners
Remove an event handler for the given type.
Type of event to unregister handler
from, or "*"
Handler function to remove
Register an event handler for the given type.
Type of event to listen for, or "*"
for all events
Function to call in response to given event
Refresh tab list, and switch to a specified index
Switch to a specified index
Generated using TypeDoc
Tab
Example
<section id="tab"> <nav> <a>tab 1</a> <a>tab 2</a> <a>tab 3</a> </nav> <article>content 1</article> <article>content 2</article> <article>content 3</article> </section>
const tab = new Tab(document.getElementById('tab')); tab.on('switch', ({title, content, current, previous}) => {})