Simple jQuery Responsive Tabs Interface Plugin - jQueryTab

File Size: 10.1 KB
Views Total: 36807
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
Simple jQuery Responsive Tabs Interface Plugin - jQueryTab

Yet another jQuery tabs plugin for creating responsive tabbed panels with many options and CSS3 transition animations support.


  • Automatically converts the tabs into the accordion interface in smaller devices like iPad, iPhone, etc...
  • Remembers last active tab using cookie.
  • Keyboard navigation.
  • Supports browser history API.
  • Open on click or hover.
  • 4 tabs transitions: fade|flip|scaleUp|slideLeft.
  • 2 accordion transitions: normal and slide.

How to use it:

1. Include jQuery javascript library on the web page.

<script src="/path/to/cdn/jquery.slim.min.js"></script>

2. Include the jQueryTab plugin's CSS and JavaScript on the page.

<!-- Core Stylesheet -->
<link rel="stylesheet" href="jQueryTab.css" />
<!-- CSS3 Animations -->
<link rel="stylesheet" href="animation.css" />
<!-- Main JavaScript -->
<script src="js/jQueryTab.js"></script> 

3. Create tabs and tabbed content following the html structure as shown below:

<div class="tabs-demo">
  <ul class="tabs">
    <li><a href="#tab1">Tab1</a></li>
    <li><a href="#tab2">Tab2</a></li>
    <li><a href="#tab3">Tab3</a></li>
    <li><a href="#tab4">Tab4</a></li>
  <section class="tab_content" id="tab1">
    <p> Tabbed Conternt 1</p>
  <section class="tab_content" id="tab2">
    <p>Tabbed Conternt 2</p>
  <section class="tab_content" id="tab3">
    <p>Tabbed Conternt 3</p>
  <section class="tab_content" id="tab4">
    <p>Tabbed Conternt 4</p>

4. Initialize the plugin on the top container and done.

  // options here

5. All available options to customize the tabs.


  // class of the tabs

  // class of the header of accordion on smaller screens

  // class of content wrapper

  // class of container

  // name of the class used for active tab

  // enable accordion on smaller screens

  // the breakpoint

  // allow all tabs to collapse on accordions

  // remember last active tab using cookie
  useCookie: true,        

  // open tab on hover
  openOnhover: false,         

  // use the history api
  useHistory: true,               

  // use keyboard for navigation
  keyboardNavigation: true,       
  // position of tab - top|bottom
  tabPosition: 'top',          

  // tab to open initially; start count at 1 not 0
  initialTab: 1,          

  // name of the cookie set to remember last active tab
  cookieName: 'active-tab',   

  // when it expires in days or standard UTC time
  cookieExpires: 365,       

  // path on which cookie is accessible
  cookiePath: '',         

  // domain of the cookie

  // enable secure cookie - requires https connection to transfer
  cookieSecure: false,      
  // fade|flip|scaleUp|slideLeft     
  tabInTransition: 'fadeIn', 
  tabOutTransition: 'fadeOut',
  // transitions to use - normal or slide
  accordionTransition: 'slide', 

  // time for animation IN (1000 = 1s)

  // time for animation OUT (1000 = 1s)
  // function to call before tab is opened
  before: function(){},     

  // function to call after tab is opened
  after: function(){}       



  • Update to v2
  • Bugfix

v2.0 (2015-11-21)

  • Update jQueryTab.js

v2.0 (2014-03-20)

  • added version 2 with CSS3 transitions
  • added keyboard navigation and tab postion switching

v1.4 (2014-01-31)

  • Several bug fixes and code optimization

This awesome jQuery plugin is developed by dharmapoudel. For more Advanced Usages, please check the demo page or visit the official website.