Skip to content

Latest commit

 

History

History
54 lines (40 loc) · 1.34 KB

README.md

File metadata and controls

54 lines (40 loc) · 1.34 KB

dynatab

Create dynamic tab with zurb foundation 5.

This plugin does not require to add specific class in table.

It adds sort and filter of table generated by ajax call inside dynatab.createTab()

alt tag

Requirements

  • Zurb foundation 5 and their dependancies : 5.5.3

Installation

Add in the <head> page

<script type="text/javascript" src="dynatab.js"></script>

Add in the <body>

<div id="content">

        <ul class="tabs list__table" data-tab role="tablist">
        </ul>

        <div class="tabs-content content__table">         
        </div>
        
</div>

Usage

dynatab.ajaxType = 'GET';
dynatab.prefixIdTab = 'css';
dynatab.contentId = 'content';  
dynatab.callback = function(){alert('Loaded table!')};
var idGenerated = Math.round(Math.random() * (9999 - 1) + 1);
dynatab.createTab(
    'list__table',
    'content__table',
    'Text tab ' + idGenerated,
    'ajax.php', 
     { 
      "prefix": dynatab.prefixIdTab,     
      "id-tab-section": idGenerated
    }
);

For apply style on the tab, used class tab-action__close