-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
107 lines (94 loc) · 2.91 KB
/
index.html
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!DOCTYPE html>
<html lang="en">
<head>
<title>CSS circular progress bar</title>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="circularprogress.css"/>
<style>
.example {
float:left;
width:33%;
}
.example p {
text-align:center;
}
</style>
</head>
<body>
<div class="example">
<div class="progress newtest1"></div>
<p>
<a href="#" id="test1">Move to</a>
<input type="number" id="test1num"/>
</p>
</div>
<div class="example">
<div class="progress newtest2"></div>
<p>
<a href="#" id="test2">Move to</a>
<input type="number" id="test2num"/>
</p>
</div>
<div class="example">
<div class="progress newtest3"></div>
<p>
<a href="#" id="test3">Move to</a>
<input type="number" id="test3num"/>
</p>
</div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="circularprogress.jquery.js"></script>
<script>
$(document).ready(function(){
$('.newtest1').circles({
innerHTML: 'this is the inner wooo',
showProgress: 1,
initialPos:1,
targetPos:5,
scale: 6,
rotateBy: 360 / 6,
speed: 700,
progPreText: 'Step ',
progPostText: ' of 6',
delayAnimation: 1000,
onFinishMoving:function(pos){
console.log('done ',pos);
}
});
$('.newtest2').circles({
'targetPos':260,
speed: 40,
onFinishMoving:function(pos){
console.log('done ',pos);
}
});
$('.newtest3').circles({
initialPos:90,
targetPos:10,
showProgress: 1,
scale: 100,
progPostText: '%',
onFinishMoving:function(pos){
console.log('done ',pos);
}
});
$('#test1').click(function(e){
e.preventDefault();
var test1 = $('.newtest1').data('circles');
test1.moveProgress($('#test1num').val());
});
$('#test2').click(function(e){
e.preventDefault();
var test2 = $('.newtest2').data('circles');
test2.moveProgress($('#test2num').val());
});
$('#test3').click(function(e){
e.preventDefault();
var test3 = $('.newtest3').data('circles');
test3.moveProgress($('#test3num').val());
});
});
</script>
</body>
</html>