Skip to content

Commit

Permalink
- (Example) Added new interval callback example
Browse files Browse the repository at this point in the history
  • Loading branch information
objectivehtml committed Dec 12, 2014
1 parent 880fe38 commit 40e996b
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions examples/interval-callback.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<html>
<head>
<link rel="stylesheet" href="../compiled/flipclock.css">

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>

<script src="../compiled/flipclock.js"></script>
</head>
<body>
<div class="clock" style="margin:2em;"></div>
<div class="message"></div>

<script type="text/javascript">
var clock;

$(document).ready(function() {

clock = $('.clock').FlipClock({
clockFace: 'MinuteCounter',
callbacks: {
interval: function() {
var time = this.factory.getTime().time;

if(time) {
console.log('interval', time);
}
}
}
});
});
</script>

</body>
</html>

0 comments on commit 40e996b

Please sign in to comment.