Skip to content

Commit 40e996b

Browse files
committed
- (Example) Added new interval callback example
1 parent 880fe38 commit 40e996b

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

examples/interval-callback.html

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<html>
2+
<head>
3+
<link rel="stylesheet" href="../compiled/flipclock.css">
4+
5+
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
6+
7+
<script src="../compiled/flipclock.js"></script>
8+
</head>
9+
<body>
10+
<div class="clock" style="margin:2em;"></div>
11+
<div class="message"></div>
12+
13+
<script type="text/javascript">
14+
var clock;
15+
16+
$(document).ready(function() {
17+
18+
clock = $('.clock').FlipClock({
19+
clockFace: 'MinuteCounter',
20+
callbacks: {
21+
interval: function() {
22+
var time = this.factory.getTime().time;
23+
24+
if(time) {
25+
console.log('interval', time);
26+
}
27+
}
28+
}
29+
});
30+
});
31+
</script>
32+
33+
</body>
34+
</html>

0 commit comments

Comments
 (0)