Unitoggle - Hash Demo

Back | Github

Tabs

HTML:

<ul>
  <li class='is-active' data-toggle='toggle1' data-toggle-group='tab'>Tab 1</li>
  <li data-toggle='toggle2' data-toggle-group='tab'>Tab 2</li>
  <li data-toggle='toggle3' data-toggle-group='tab'>Tab 3</li>
</ul>
<div id='toggle1' class='tab'>
  <p>Content Tab 1</p>
</div>
<div id='toggle2' class='tab'>
  <p>Content Tab 2</p>
</div>
<div id='toggle3' class='tab'>
  <p>Content Tab 3</p>
</div>
...
<ul>
  <li class='is-active' data-toggle='toggle4' data-toggle-group='tab2'>Tab 4</li>
  <li data-toggle='toggle5' data-toggle-group='tab2'>Tab 5</li>
  <li data-toggle='toggle6' data-toggle-group='tab2'>Tab 6</li>
</ul>
<div id='toggle4' class='tab'>
  <p>Content Tab 4</p>
</div>
<div id='toggle5' class='tab'>
  <p>Content Tab 5</p>
</div>
<div id='toggle6' class='tab'>
  <p>Content Tab 6</p>
</div>

JS:

const toggler = new Unitoggle({
  hash: true
});

DEMO:

  • Tab 1
  • Tab 2
  • Tab 3

Tab Content 1

Tab Content 2

Tab Content 3

  • Tab 4
  • Tab 5
  • Tab 6

Tab Content 4

Tab Content 5

Tab Content 6

  • Tab 7
  • Tab 8
  • Tab 9

Tab Content 7

Tab Content 8

Tab Content 9