Themeable jQuery Tabs Plugin CardTabs - Download Minimal Themeable jQuery Tabs Plugin - CardTabs

Download Minimal Themeable jQuery Tabs Plugin – CardTabs

Posted on

This time I will share jQuery Plugin and tutorial about Minimal Themeable jQuery Tabs Plugin – CardTabs, hope it will help you in programming stack.

Themeable jQuery Tabs Plugin CardTabs - Download Minimal Themeable jQuery Tabs Plugin - CardTabs
File Size: 11.9 KB
Views Total: 2278
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

CardTabs is an ultra-light, cross-browser jQuery tabs plugin that automatically creates tabs to switch between tabbed content on click.

How to use it:

1. Include the jQuery CardTabs plugin and other required resources on the webpage.

1 <link rel="stylesheet" href="jquery.cardtabs.css">
2 <script src="//code.jquery.com/jquery.min.js"></script>
3 <script src="jquery.cardtabs.js"></script>

2. Create the tabbed content and define the tab names in the data-tab attribute:

01 <div class="demo">
02   <div data-tab="tab 1">
03     Tab 1 content
04   </div>
05   <div data-tab="tab 2">
06     Tab 2 content
07   </div>
08   <div data-tab="tab 3">
09     Tab 3 content
10   </div>
11   ...
12 </div>

3. Call the main function cardTabs on the top container and done.

1 $('.demo').cardTabs();

4. The plugin comes with 4 themes from which you can choose during init.

1 $('.demo').cardTabs({
2  
3   // 'inset', 'graygreen' and 'wiki'
4   'theme': ''
5    
6 });

5. If you’d like to set the active tab on page load:

1 <div class="active" data-tab="tab 2">
2   Tab 2 content
3 </div>

6. You’re also allowed to create your own themes in the CSS as this:

01 /*  Green gray slate */
02 div.card-tabs-bar.graygreen {
03   border-bottom: 1px solid #e5e5e5;
04   border-radius: 3px;
05 }
06  
07 div.card-tabs-bar.graygreen a {
08   padding: 15px;
09   border-radius: 0px;
10   margin: 0;
11   padding-bottom: 10px;
12   margin-bottom: -2px;
13   font-size: 17px;
14 }
15  
16 div.card-tabs-bar.graygreen a.active {
17   background-color: #fafafa;
18   border-top: 4px solid #2CC185;
19 }
20  
21 div.card-tabs-stack.graygreen div[data-tab] {
22   padding: 10px;
23   background-color: #fafafa;
24   border: 1px solid #e5e5e5;
25   border-top: none;
26   border-radius: 3px;
27 }

Change log:

2018-03-29

  • Bugfixed

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

source : jquery.net