2016-10-31 16:16:31
http://zhcdn01.xoyo.com/xassets/com/pf/effect/js-milo/milo-min.js
http://zhcdn01.xoyo.com/xassets/com/pf/effect/tab/index.html
更新说明
在页面前调用脚本http://zhcdn01.xoyo.com/xassets/com/pf/effect/js-milo/milo-min.js
need("biz.tabs",function (tabs){})中调用相应的滚动js模块,设置相应参数即可
<script>
need("biz.tabs",function (tabs){
//简单切换
tabs.init("tab", "tab-panel");
//滑动切换
tabs.init("slideTab", "tab-panel",{
timeout: 80,//延迟切换时间。默认参数为60;
currCls: "on",//设置当前标签(li)class 名。默认参数为"on";
disCls: "dis",//控制显示class名。默认参数为"dis";
event: "mouseover",//事件类型。默认为"mouseover";
animation: "slide",//有动画效果设置此参数。参数可选slide/fade (滚动/渐入)
change: 210,//滚动切换的宽度
auto: true,//是否自动切换。默认为false
Pause: 300 //每次自动停顿时间(auto为true时有效)
});
//渐变切换
tabs.init("fadeTab", "tab-panel",{
timeout: 80,//延迟切换时间。默认参数为60;
currCls: "on",//设置当前标签(li)class 名。默认参数为"on";
disCls: "dis",//控制显示class名。默认参数为"dis";
event: "mouseover",//事件类型。默认为"mouseover";
animation: "fade",//有动画效果设置此参数。参数可选slide/fade (滚动/渐入)
auto: true,//是否自动切换。默认为false
Pause: 300 //每次自动停顿时间(auto为true时有效)
})
})
</script>