Tabs 组件显示第一个 tab 面板,然后显示第二个、第三个… 我们将写一些代码来自动地切换 tab 面板,然后让它循环。
案例
Add autoplay to tabs - jQuery EasyUI Demo
$(function(){
var index = 0;
var t = $('#tt');
var tabs = t.tabs('tabs');
setInterval(function(){
t.tabs('select', tabs[index].panel('options').title);
index++;
if (index >= tabs.length){
index = 0;
}
}, 3000);
});
Add autoplay tab demo
The tab panel can be auto switched to next.