html选项卡插件,基于jQuery实现Tabslet选项卡插件

特效描述:基于jQuery实现 Tabslet 选项卡插件。基于jQuery实现Tabslet选项卡插件

代码结构

1. 引入CSS

2. 引入JS

3. HTML代码

Default

 
   

$('.tabs').tabslet();

This is the default tab functionality.

Tab 2

Tab 3

Hover

 
   

$('.tabs').tabslet({

mouseevent: 'hover',

attribute: 'href',

animation: false

});

Tabs change on mouse over...

Tab 2

Tab 3

Animation

 
   

$('.tabs').tabslet({

mouseevent: 'click',

attribute: 'href',

animation: true

});

Change the tab to see that there is an animation.

Tab 2

Tab 3

Rotation

 
   

$('.tabs').tabslet({

autorotate: true,

delay: 6000

});

It's alive!

It's alive!!

It's alive!!!

Controls

 
   

$('.tabs').tabslet({

controls: {

prev: '.prev',

next: '.next'

}

});

Tab 1

Tab 2

Tab 3

Custom Events

Custom event "_before"

 
   

$('.before_event').tabslet();

$('.before_event').on("_before", function() {

// do stuff here

});

An alert message before the tab change...

TAB 2

TAB 3

Custom event "_after"

 
   

$('.after_event').tabslet({

animation: true

});

$('.after_event').on("_after", function() {

// do stuff here

});

An alert message is coming after the animation...

TAB 2

TAB 3

Use of data attribute to load

The attribute "data-toggle"

 
   

Just include the plugin and add the data attribute to your html tag!

TAB 2

TAB 3

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值