Dynamic Responsive Tabs / Accordion Plugin For jQuery

File Size: 29.5 KB
Views Total: 10665
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
Dynamic Responsive Tabs / Accordion Plugin For jQuery

Just another responsive jQuery tabs plugin which automatically converts between a tabs interface and an accordion interface based on the screen size. With support for HTML5 hashchange event. Works on most popular platforms like desktop, iOS, Android, iPad and much more.

Basic usage:

1. Load the required stylesheet in the document's head section. You can override or modify the CSS rules in the jquery.atAccordionOrTabs.css to create your own tabs / accordion styles.

<link href="jquery.atAccordionOrTabs.css" rel="stylesheet">

2. Load jQuery library and the jquery.atAccordionOrTabs.js at the end of the document.

<script src="jquery.atAccordionOrTabs.js"></script>

3. Load the jQuery BBQ plugin after jQuery library that provides the support of bookmarkable #hash history.

<script src="jquery.bbq.js"></script>

4. Create a tabbed interface from an html unordered list like this:

<ul class="demo">
  <li><a>Tab One</a>
      <p>Content 1</p>
  <li><a>Tab Two</a>
      <p>Content 2</p>
  <li><a>Tab Three</a>
      <p>Content 3</p>  
  <li><a>Tab Four</a>
      <p>Content 4</p>

5. Call the function on the html list and we're done.


6. Customization options with default values.

// default tab
defaultOpened: 0,

// allows a user to force the vertical mode at a certain pixel width of its container, 
// in the case when a table may technically fit but you'd prefer the vertical mode
containerBreakPoint: 0, 

tabsIfPossible: true,
hashbangPrefix: 'tabset_',
centerTabs: false



  • Accessibility and Bug Fixes


  • Made fix_accordion_or_tabs function global in case you ever need to

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