18EasyUI 布局- 添加自动播放标签页(Tabs)
添加 标签 布局 tabs 自动播放
2023-09-11 14:15:41 时间
Tabs 组件显示第一个 tab 面板,然后显示第二个、第三个… 我们将写一些代码来自动地切换 tab 面板,然后让它循环。
案例
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="keywords" content="jquery,ui,easy,easyui,web">
<meta name="description" content="easyui help you build your web page easily!">
<title>Add autoplay to tabs - jQuery EasyUI Demo</title>
<link rel="stylesheet" type="text/css" href="http://www.w3cschool.cc/try/jeasyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="http://www.w3cschool.cc/try/jeasyui/themes/icon.css">
<link rel="stylesheet" type="text/css" href="http://www.w3cschool.cc/try/jeasyui/demo/demo.css">
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="http://www.w3cschool.cc/try/jeasyui/jquery.easyui.min.js"></script>
<script>
$(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);
});
</script>
</head>
<body>
<h2>Add autoplay tab demo</h2>
<div class="demo-info" style="margin-bottom:10px">
<div class="demo-tip icon-tip"></div>
<div>The tab panel can be auto switched to next.</div>
</div>
<div id="tt" class="easyui-tabs" style="width:700px;height:270px;">
<div title="Shirt1" style="padding:20px;">
<img src="images/shirt1.gif">
</div>
<div title="Shirt2" style="padding:20px;">
<img src="images/shirt2.gif">
</div>
<div title="Shirt3" style="padding:20px;">
<img src="images/shirt3.gif">
</div>
<div title="Shirt4" style="padding:20px;">
<img src="images/shirt4.gif">
</div>
<div title="Shirt5" style="padding:20px;">
<img src="images/shirt5.gif">
</div>
</div>
</body>
</html>
相关文章
- C# 系统应用之ListView控件 (三).添加ContextMenuStrip右键菜单打开删除文件
- 关于destoon后台添加自定义功能+前台展示标签调用方法
- discuz添加标签聚合页
- JavaScript实现js添加dom元素(以下拉框为例子)
- 404 img标签usemap,一个图片中添加多个链接
- 阿里云云主机添加swap分区与swap性能优化
- helm添加仓库命令:helm repo add带用户名密码
- Android GIS开发系列-- 入门季(6)GraphicsLayer添加文字与图片标签
- AE 向已存在的要素类中添加字段
- ComBox控件下拉框选项的添加
- paip.提升用户体验-------在C++ Builder 中为Form窗体添加背景图片
- Python项目学习一:项目一:自动添加标签-初次实现
- VMware 虚拟机添加 2 张网卡 设置 NAT 与 桥接网络
- 【Groovy】xml 序列化 ( 使用 MarkupBuilder 生成 xml 数据 | 标签闭包下创建子标签 | 使用 MarkupBuilderHelper 添加 xml 注释 )
- Android4.4 添加系统属性
- ambari安装部署HDFS--添加DataNode节点和nfsgateways(二)
- Shell脚本之为集群机器添加DNS
- Zabbix action 为redis的item项添加触发器和动作
- 【SSM整合案例】静态资源和分页标签的添加