-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroladex.html
executable file
·69 lines (58 loc) · 1.23 KB
/
roladex.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
<html>
<head>
<title>roladex</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
<script src="js/jquery-1.11.0.min.js"></script>
<script src="js/roladex.js"></script>
</head>
<body>
<div>
<button class="up">↑</button>
<button class="down">↓</button>
</div>
<div class="counter">
<div class="roladex hr"></div>
<div class="roladex min"></div>
<div class="roladex sec"></div>
</div>
<script>
var hr = $('.hr').roladex({
startvalue : 2,
minvalue : 0,
maxvalue : 23
}).data('roladex');
var min = $('.min').roladex({
startvalue : 1,
minvalue : 0,
maxvalue : 59
}).data('roladex');
var sec = $('.sec').roladex({
startvalue : 56,
minvalue : 0,
maxvalue : 59
}).data('roladex');
$('button.down').click(function(){
sec.flipdown(function(secs){
if(secs==0){
min.flipdown(function(mins){
if(mins==0){
hr.flipdown();
}
});
}
});
});
$('button.up').click(function(){
sec.flipup(function(secs){
if(secs==0){
min.flipup(function(mins){
if(mins==0){
hr.flipup();
}
});
}
});
});
</script>
</body>
</html>