Sign inSign up

Simple and Practical jQuery Appointment Progress Bar

Add-ons
2026-07-26 01:08 6 views • 0 downloads 2.1KB
Simple and Practical jQuery Appointment Progress Bar

Last Updated: 2019-12-15 22:48:18

Usage

Three external files are required: jquery.step.css, jquery-1.10.2.js, and 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">Previous Step</button>
<button id="nextBtn">Next Step</button>
<button id="btn1">Go to Step 2</button>
<button id="btn2">Go to Step 3</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: ["Complete Application Form", "Upload Documents", "Pending Confirmation", "Confirmed", "Appointment Completed"]
});
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());
});