tabbed navigation taby - Download Auto Generate Tabbed Navigation With jQuery - Taby

Download Auto Generate Tabbed Navigation With jQuery – Taby

Posted on

This time I will share jQuery Plugin and tutorial about Auto Generate Tabbed Navigation With jQuery – Taby, hope it will help you in programming stack.

tabbed navigation taby - Download Auto Generate Tabbed Navigation With jQuery - Taby
File Size: 3.94 KB
Views Total: 725
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

Taby is a lightweight, SEO-friendly jQuery plugin used to automatically generate a semantic tabs navigation for tabbed content within the document.

Clicking on the tabs will switch between tabbed content with fade in and fade out animations.

How to use it:

1. Create the tabbed content following the HTML structure as follows:

01 <div id="tabs" class="tabs">
02  
03   <div class="tabs__item">
04     <div class="tabs__item--content">
05       <h3 class="heading heading--medium">Title 1</h3>
06       <p>Content 1</p>
07     </div>
08   </div>
09  
10   <div class="tabs__item">
11     <div class="tabs__item--content">
12       <h3 class="heading heading--medium">Title 2</h3>
13       <p>Content 2</p>
14     </div>
15   </div>
16  
17   <div class="tabs__item">
18     <div class="tabs__item--content">
19       <h3 class="heading heading--medium">Title 3</h3>
20       <p>Content 3</p>
21     </div>
22   </div>
23  
24   ...
25  
26 </div>

2. Download and insert the JavaScript file jquery.tabs.js after jQuery.

2         integrity="sha384-tsQFqpEReu7ZLhBV2VZlAu7zcOV+rXbYlF2cqB8txI/8aZajjp4Bqd+V6D5IgvKT"
3         crossorigin="anonymous"></script>
4 <script src="js/jquery.tabs.js"></script>

3. Call the function tabs() on the top container.

1 $(document).ready(function(){
2    
3   $("#tabs").tabs();
4    
5 });

4. This will generate a tabs navigation using HTML unordered list as follows:

1 <ul class="tabs-nav">
2   <li class="tabs-nav__item tabs-nav_item--active">Title 1</li>
3   <li class="tabs-nav__item">Title 2</li>
4   <li class="tabs-nav__item">Title 3</li>
5   <li class="tabs-nav__item">Title 4</li>
6 </ul>

5. Apply your own CSS styles to the tabs navigation.

1 <ul class="tabs-nav">
2   <li class="tabs-nav__item tabs-nav_item--active">Title 1</li>
3   <li class="tabs-nav__item">Title 2</li>
4   <li class="tabs-nav__item">Title 3</li>
5   <li class="tabs-nav__item">Title 4</li>
6 </ul>

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

source : jquery.net