agencenous/jquery-tabs
最新稳定版本:1.0.3
Composer 安装命令:
composer require agencenous/jquery-tabs
包简介
Simply add tabs.
README 文档
README
Simply add tabs.
Install
composer require agencenous/jquery-tabs
Usage
<style rel="stylesheet" href="/vendor/agencenous/jquery-tabs/jquery-tabs.css"/> <script src="/vendor/agencenous/jquery-tabs/jquery-tabs.js"/>
Example
<div class="content"> <section> <h3>Section 1</h3> <p>Somme content</p> </section> <section> <h3>Section 2</h3> <p>Somme content</p> </section> <section> <h3>Section 3</h3> <p>Somme content</p> </section> </div>
And then, just instanciate:
jQuery('.content').createTabs({ children: 'section', childrenTitle: 'h3' });
Additional params
- hideUntilLast
- prevText,
- nextText,
- prevClass,
- nextClass
Full example
jQuery('#form').createTabs({ children: 'fieldset', childrenTitle: '.tab-title', hideUntilLast: 'input[type=submit]', prevText: '« back', nextText: 'Next »', prevClass: 'btn', nextClass: 'btn' });
Triggers
jQuery('#form') .on('tab_ready', function(){ console.log('READY!'); }) .on('tab_change', function(){ console.log('TAB CHANGED!'); }) .createTabs();
统计信息
- 总下载量: 1.37k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2023-04-27