jQuery预约进度条简单实用

插件特效
2026-07-26 01:08 4 次浏览 • 0 次下载 2.1KB
jQuery预约进度条简单实用

更新时间:2019-12-15 22:48:18

使用方法

需要调用3个外部文件,它们分别是jquery.step.css,jquery-1.10.2.js,jquery.step.min.js

1
2
3
<link rel="stylesheet" type="text/css" href="css/jquery.step.css" />
<script src="js/jquery.step.min.js"></script>

html

1
2
3
4
5
6
7
8
9
10
<div class="main">
<div id="step"></div>
<div class="btns">
<button id="prevBtn">上一步</button>
<button id="nextBtn">下一步</button>
<button id="btn1">跳到第二步</button>
<button id="btn2">跳到第三步</button>
</div>
<div class="info">index:<span id="index"></span></div>
</div>

js

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
var step1 = $("#step");
var index1 = $("#index");
step1.step({
index1: 0,
time: 500,
title: ["填写申请表", "上传资料", "待确认", "已确认", "预约完成"]
});
index1.text(step1.getIndex());
$("#prevBtn").on("click", function() {
step1.prevStep();
index1.text(step1.getIndex());
});
$("#nextBtn").on("click", function() {
step1.nextStep();
index1.text(step1.getIndex());
});
$("#btn1").on("click", function() {
step1.toStep(1);
index1.text(step1.getIndex());
});
$("#btn2").on("click", function() {
step1.toStep(2);
index1.text(step1.getIndex());
});
星河码客

发现和分享优质开源项目,传承互联网精神,为开发者服务。

关于本站

关于我们

隐私政策

侵权投诉

站长:IT小君

粤ICP备20043561号

2016-2046 © 星河码客

联系我们

微信/广告合作:ITcloub (备注星河码客)

免责声明:本站资源版权归原作者所有,仅供学习与交流。如有侵权,请通过「关于我们 - 侵权投诉」联系删除。

Powered by Nuxt · Deployed on Cloudflare