jQuery tabs plugin

Overview

ion.tabs

English description | Описание на русском

jQuery tabs plugin. Easy and well done tabs with many options and skin support


Description

  • Supports many groups of tabs at one page.
  • Generate events and callbacks.
  • Support many types of position saving, for each tabs group on the page.
  • Very easy in set up and customisation. Has skin support.
  • Has public methods for outside control.
  • Cross-browser support: Google Chrome, Mozilla Firefox, Opera, Safari, IE(8.0+)
  • Ion.Tabs supports touch-devices (iPhone, iPad, etc.).
  • Ion.Tabs freely distributed under terms of MIT licence.

Dependencies

Usage

Import this libraries:

  • jQuery
  • ion.tabs.min.js

Add the following stylesheets to the page:

Plus, a skin for the tabs. Two skins are included:

  • ion.tabs.skinBordered.css
  • ion.tabs.skinFlat.css

Initialisation

Create this HTML structure:

<div class="ionTabs" id="tabs_1" data-name="Tabs_Group_name">
    <ul class="ionTabs__head">
        <li class="ionTabs__tab" data-target="Tab_1_name">Tab 1 name</li>
        <li class="ionTabs__tab" data-target="Tab_2_name">Tab 2 name</li>
        <li class="ionTabs__tab" data-target="Tab_3_name">Tab 3 name</li>
    </ul>
    <div class="ionTabs__body">
        <div class="ionTabs__item" data-name="Tab_1_name">
            Tab 1 content
        </div>
        <div class="ionTabs__item" data-name="Tab_2_name">
            Tab 2 content
        </div>
        <div class="ionTabs__item" data-name="Tab_3_name">
            Tab 3 content
        </div>

        <div class="ionTabs__preloader"></div>
    </div>
</div>

To initialise tabs, call $.ionTabs("selector"):

$.ionTabs("#tabs_1");                       // one tabs group
$.ionTabs("#tabs_1, #tabs_2, #tabs_3");     // if you have many tabs groups on the page

Settings

Property Default Description
type hash Optional property, choose position saving type:
hash — save tabs position to the site url, using hash (see the example in the address bar). Allows to send tabs position via links.
storage — save tabs position to the Local Storage. Tabs position is remembered only at one computer.
none — don't save tabs position. Each time page reloads, the first tab of each group will be open.

Callback and events

Property Default Description
onChange - Calls each time you switch tabs, returns object with group name, active tab name and active tab ID.
window.event ionTabsChange - Or you can subscribe on ionTabsChange event.
The event gets the same object as onChange callback.

An example of a tabs initialisation:

$.ionTabs("#tabs_1, #tabs_2", {
    type: "storage",                    // hash, storage or none
    onChange: function(obj){            // callback
        console.log(obj);
    }
});

To subscribe on tabs change event you can do this:

$(window).on("ionTabsChange", function(e, obj){
    console.log(obj.group);
    console.log(obj.tab);
    console.log(obj.tabId);
});

Public methods

Switching tabs from outside: $.ionTabs.setTab(group, tab);:

$(".myButton").on("click", function(){
    $.ionTabs.setTab("Tabs_Group_name", "Tab_1_name");
});

Update history


Support Ion-series plugins development:

You might also like...

Obsidian jTab adds the ability to show guitar chords and tabs directly in your notes.

Obsidian jTab adds the ability to show guitar chords and tabs directly in your notes.

Obsidian jTab Guide Obsidian jTab adds the ability to show guitar chords and tabs directly in your notes. It uses the jTab library to render the chord

Dec 25, 2022

BCash is an app to help you keep track of who you owe and who owes you money in an easy way. Split your tabs and more.

BCash BCash is an app to help you keep track of who you owe and who owes you money in an easy way. Split your tabs and more. Routes for develpment: lo

Aug 11, 2022

Basic, accessible, responsive and freely restyleable tabs.

Skeletabs · Skeletabs is an open source jQuery plugin that provides tabbed browsing feature to your web contents. It is focused on accessibility and s

Nov 13, 2022

Bootstrap 4 stylesheet that implements vertically-oriented navigation tabs.

Bootstrap 4 stylesheet that implements vertically-oriented navigation tabs.

Responsive Vertical Navigation Tabs for Boostrap 4 New! 💥 If you use Bootstrap 5, a new package is available for that: bootstrap-5-vertical-tabs A st

Aug 4, 2022

Vanilla JavaScript tabs - tiny and simple.

Vanilla JavaScript Tabs Vanilla JavaScript Tabs - simple and awesome. — Inspired by the blazing fast, lightweight, cross-platform and crazy popular Va

Dec 22, 2022

A block preview that directly displays the block fields, including tabs.

A block preview that directly displays the block fields, including tabs.

Kirby Block Preview Fields This plugin for Kirby 3 displays the block fields directly in the block preview, including tabs. Inspired by the Kirby Fiel

May 10, 2023

JQuery charCounter - jQuery Character Counter Plugin

JQuery charCounter - jQuery Character Counter Plugin

jQuery Character Counter A jQuery based character counter for input and textarea HTML tags. What is this? This simple plugin allows you to add a c

Aug 10, 2022

jQuery quick notification plugin. jQuery плагин быстрых уведомлений

Note: English translation by Google Translate Notific About Description: this is a jQuery plugin that helps you display notifications on your site. Li

Nov 7, 2021

A variety of jQuery plugin patterns for jump starting your plugin development

jQuery Plugin Patterns So, you've tried out jQuery Boilerplate or written a few of your own plugins before. They work to a degree and are readable, bu

Dec 31, 2022
Comments
  • Missing tabs activated

    Missing tabs activated

    I am using this plugin on pages with dynamic content and i am using the local storage for saving active tabs. When the pages are loaded it can happen that a tab which is saved in the local storage doesnt exist any more (got deleted on another menu).

    The plugin still tries to activate that not existing tab and this results in an empty page. To prevent that i modified line 199 in the js file.

    before

    if ( url[name] ) {

    after

    if ( url[name] && $("#Button__" + name + "__" +url[name]).length ) {

    This way in case of a missing tab the first one is loaded. Is there a better way to achieve that?

    Feature request 
    opened by CaptainCannabis 0
  • Скрывать вкладки, если они ничего не содержат

    Скрывать вкладки, если они ничего не содержат

    Отпишусь о том, чего мне не хватает в плагине, так как верхняя часть html кода <ul class="ionTabs__head"> у меня заранее прописана в коде страницы, то в редакторе прописываю только дивы <div class="ionTabs__body">, но бывает так, что не всегда во вкладке есть текст, поэтому не хватает возможности делать вкладки неактивными, или скрывать их, если div не заполнен. Я думаю, что многие столкнулись с такой же проблемой.

    Feature request 
    opened by shkip3r 1
  • ion.tabs not initializing correctly in Chrome

    ion.tabs not initializing correctly in Chrome

    10-15-2015 5-31-15 pm

    Noticed the other day there's a small issue with the initialization of the plugin in Chrome.

    Instead of the content displaying when the page is first visited, it shows nothing. (See image). I'm using Storage to initialize the object.

    Doesn't happen in IE or FireFox. Thoughts?

    Here's the init code:

    <script type="text/javascript">
    $(document).ready(function(){
    $.ionTabs("#tabs_1",
    { type: "storage",
    onChange: function(obj){
    console.log(obj);
    }
    });
    });
    
    </script>
    
    Bug 
    opened by impetigo 1
  • Tabs in tabs

    Tabs in tabs

    Здравствуйте. Подскажите пожалуйста, должны ли табы работать внутри табов? Сейчас таб, который вложен в другой таб, переписывает в хэше название родительского таба своим, получается у двух групп одинаковые табы.

    Пример: TabGroup1 => tabA - в нем еще одна группа TabGroup2 => tabB При клике на вкладки TabGroup2 в строке адреса послучается TabGroup1:tabB | TabGroup2:tabB

    Discussion 
    opened by wsnnn 6
Releases(1.0.2)
Owner
Denis Ineshin
Senior JavaScript engineer
Denis Ineshin
jQuery Tabs Plugin. CSS Tabs with Accessible and Responsive Design. Lot of Tab Themes with Vertical and Horizontal Orientation.

Macaw Tabs Macaw Tabs is jQuery tabs plugin. It helps you to create accessible and responsive jQuery tabs by implementing the W3 design patterns for t

HTMLCSSFreebies 6 Dec 8, 2022
jQuery plugin to show a tabs bar for navigation. The tabs can be defined once, and shared across multiple HTML pages.

jquery.simpletabs v1.2.3 The jquery.simpletabs plugin shows a tabs bar for navigation. The tabs can be defined once, and shared across multiple HTML p

Peter Thoeny 1 Feb 23, 2022
jQuery tabs plugin

English description | Описание на русском jQuery tabs plugin. Easy and well done tabs with many options and skin support Version: 1.0.2 Project page a

Denis Ineshin 83 Nov 27, 2022
Responsive Tabs is a jQuery plugin that provides responsive tab functionality.

Responsive Tabs is a jQuery plugin that provides responsive tab functionality. The tabs transform to an accordion when it reaches a CSS breakpoint. You can use this plugin as a solution for displaying tabs elegantly on desktop, tablet and mobile.

Jelle Kralt 537 Dec 8, 2022
A jQuery tabs module for todays web!

tabulous.js A jQuery tabs module for todays web! Documentation Tabulous.js can be used with any contents you choose in the tabs and it couldn't be mor

Aaron Lumsden 554 Dec 4, 2022
Responsive tabs-to-accordion script without jQuery, written using pure JavaScript

vanilla-tabs Responsive tabs-to-accordion script without jQuery, written using pure JavaScript Author Dmytro Kudleichuk LinkedIn GitHub Online Demo Se

Dmitriy Kudleichuk 7 Dec 20, 2022
Chrome style tab-resizing for jQuery UI tabs

stretchy tabs Chrome style tab-resizing for jQuery UI tabs stretchy tabs provides methods for adding and removing tabs ##Initialize stretchy tabs $( "

Adam Jimenez 8 Nov 19, 2021
An Obsidian plugin that allows adding iframes with custom styling as editor tabs. Also comes with presets for Google Keep and more.

Obsidian Custom Frames An Obsidian plugin that turns web apps into panes using iframes with custom styling. Also comes with presets for Google Keep an

Ellpeck 208 Jan 8, 2023
⚡Chrome extension allows you to create lists of Google and Github dork to open multiple tabs with one click, import "scope/out of scope" from #HackerOne #Bugcrowd #Intigriti ...

FastDork v0.1 This chrome extension allows you to create lists of Google and Github dork to open multiple tabs with one click, import "scope/out of sc

skvndr 74 Dec 31, 2022
Save resources by suspending unused tabs after 20 min.

Tab Suspender [WIP] Save resources by suspending unused tabs after 20 min. Instalation Enable Epiphany extension. Optional if not done. Download the l

null 5 May 7, 2022