jquery 横向滑动,下一步上一步。
来源:互联网 发布:js时间戳转换成 小时前 编辑:程序博客网 时间:2024/06/05 21:51
#wizard{border: 5px solid #789;font-size: 12px;height: 530px;margin: 20px auto;overflow: hidden;position: relative;}#wizard .items{width: 20000px;clear: both;position: absolute;}#wizard .right{float: right;}#wizard #status{height: 35px;background: #79B8E9;padding-left: 25px !important;}#status li{float: left;color: #fff;padding: 10px 30px;}#status li.active{background-color: #369;font-weight: normal;}.input{width: 240px;height: 18px;margin: 10px auto;line-height: 20px;border: 1px solid #d3d3d3;padding: 2px;}.page{padding: 20px 30px;width: 650px;float: left;}.page h3{height: 42px;font-size: 16px;border-bottom: 1px dotted #ccc;margin-bottom: 20px;padding-bottom: 5px;}.page h3 em{font-size: 12px;font-weight: 500;font-style: normal;}.page p{line-height: 24px;}.page p label{font-size: 14px;display: block;}.btn_nav{height: 36px;line-height: 36px;margin: 20px auto;}.prev, .next{width: 100px;height: 32px;line-height: 32px;background: url(btn_bg.gif) repeat-x bottom;border: 1px solid #d3d3d3;cursor: pointer;}
<script type="text/javascript"> $(function () { $("#wizard").scrollable({ onSeek: function (event, i) { //切换tab样式 $("#status li").removeClass("active").eq(i).addClass("active"); }, onBeforeSeek: function (event, i) { //验证表单 if (i == 1) { var user = $("#user").val(); if (user == "") { alert("请输入用户名!"); return false; } var pass = $("#pass").val(); var pass1 = $("#pass1").val(); if (pass == "") { alert("请输入密码!"); return false; } if (pass1 != pass) { alert("两次密码不一致!"); return false; } } } }); }); </script>
<div id="wizard"> <ul id="status"> <li class="active"><strong>1.</strong>创建账户</li> <li><strong>2.</strong>填写联系信息</li> <li><strong>3.</strong>填写联系信息1111</li> <li><strong>4.</strong>完成</li> </ul> <div class="items"> <div class="page"> -----任意html内容----- <div class="btn_nav"> <input type="button" class="next right" value="下一步»" /> </div> </div> <div class="page"> -----任意html内容----- <div class="btn_nav"> <input type="button" class="prev" style="float: left" value="«上一步" /> <input type="button" class="next right" value="下一步»" /> </div> </div> <div class="page"> -----任意htmlsasdasd内容----- <div class="btn_nav"> <input type="button" class="prev" style="float: left" value="«上一步" /> <input type="button" class="next right" value="下一步»" /> </div> </div> <div class="page"> -----任意html内容----- <div class="btn_nav"> <input type="button" class="prev" style="float: left" value="«上一步" /> <input type="button" class="next right" id="sub" value="确定" /> </div> </div> </div> </div>
来源:http://www.helloweba.com/view-blog-134.html
上面代码只能限定,下一步个数,只能横向导航4个内容, 如果需要添加横向菜单内容(会出现css乱,页面会显示2个上一步或者下一步),可以才CSS里查询 page 修改宽度,
赋值 <div>
<script type="text/javascript" src="scrollable.js"></script>
0 0
- jquery 横向滑动,下一步上一步。
- 上一步和下一步、完成
- 如何实现“上一步”、“下一步”的对话框
- activiti选择上一步下一步处理人
- 【总结】刷新和上一步下一步
- tab选项卡 ‘上一步‘ ‘下一步形式’
- Winform中模仿实现上一步、下一步的导航页面
- 开发中选择"上一步""下一步"的思路
- 不用属性页方法实现 上一步 下一步 对话框功能
- 网页上一步、下一步、刷新的js代码
- Chrome、safi、IE浏览器通用"上一步、下一步"代码
- Winform中模仿实现上一步、下一步的导航页面
- eclipse如何执行上一步和下一步“撤销”操作
- Bootstrap Modal的“上一步”,“下一步”切换功能的实现
- jquery滑动横向二级菜单特效
- Linux下一步一步学习JNI
- 输入法的IME_ACTION的中文提示语是"上一步",修改为“下一步”(MTK)
- BCG属性表单风格修改与删除“上一步”“下一步”“帮助”“确定”四个按钮
- LeetCode | Multiply Strings
- RMAN常用命令
- UIBUTTON添加图片点击-tag一个图片亮其他图片都灭
- Android备份、还原通讯录和短信
- html mako
- jquery 横向滑动,下一步上一步。
- Linux系统调用
- Windows phone8 获取本机ip地址
- 黑马程序员_HTML中div与span的区别
- 2013流行词句大汇总,不知道真就out了!!
- 代码中特殊的注释技术——TODO、FIXME和XXX的用处
- WebStorm 7.0 发布,智能HTML/CSS/JS开发利器
- 我的android 第35天 - BroadcastReceiver(三)
- ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'mysql'