Fork me on GitHub

SwitchTab


Pure javascript tab library (switching tabs by using Ajax), and you can customize your tabs in a fastest way.(also support history API)

Demo


Usage


Include javascript:

  <script type="text/javascript" src="your_path/switchTab.js">
  <script>
		

Settings:

  var newSwitchTab = new switchTab({
    tabClass: 'tab_group',
    contentId: 'content_container',
    activeClass: 'tab_active',
    tabId: ['tab1', 'tab2', 'tab3', 'tab4'],
    showFirst: 'tab1'
  });
		

Setting URL:

Tab-url is needed for linking to the page you want, this library is using Ajax :D

  <div class="tab_group" id="tab1" tab-url="./tab_content1.html">
    tab1
  </div>
		

Features & setting details:



And enjoy :)