Responsive Tabbing with Accordion In Mobile View - mTab

File Size: 6.96 KB
Views Total: 7022
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
Responsive Tabbing with Accordion In Mobile View - mTab

mTab is a lightweight (~4kb unminified) jQuery plugin to create a responsive tabbed interface that automatically switch between tabs view and accordion view according to a specified breakpoint.


  • Custom active tab.
  • Custom open / close animation.
  • Allows to open tabs with URL.
  • Callback functions.
  • Auto scrolls to top position in accordion view.
  • Custom breakpoint at which you want to switch between tabs view and accordion view.

How to use it:

1. Load the core style sheet mTab-style.css in the head section of the document.

<link href="css/mTab-style.css" rel="stylesheet">

2. The required markup structure for the tabbed interface.

<div class="tabbing">
  <ul class="tabNav">
    <li><a href="#tab1">tab 1</a></li>
    <li><a href="#tab2">tab 2</a></li>
    <li><a href="#tab3">tab 3</a></li>
  <div class="tabContainer">
    <div class="tabContent" id="tab1">
      <h3>Tab Content 1</h3>
      <p>More Content Here</p>
    <div class="tabContent" id="tab2">
      <h3>Tab Content 2</h3>
      <p>More Content Here</p>
    <div class="tabContent" id="tab3">
      <h3>Tab Content 3</h3>
      <p>More Content Here</p>

3. Load the latest jQuery library and the jquery-mTab-min.js at the end of the document.

<script src="//"></script>
<script src="js/jquery-mTab-min.js"></script>

4. Active the plugin with default options.


5. Configuration options.

// CSS selector for navigtation
navigation: ".tabNav",

// CSS selector for container
container: ".tabContainer",

// active tab on page load
activeTab: 1,

// CSS class for active tab
activeClass: "active",

// scroll offset
scrollOffset: true,

// breakpoint in pixels
accordScreen: 768,

// enable animation
animation: false,

// open tabs with URL hashes
openWithUrl: false,

// callback functions
callbackonclick: function() {},
callback: function() {}

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