2020-04-30 16:34:21 +02:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<link rel="stylesheet" href="./css/flipclock.css">
|
|
|
|
|
|
|
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
|
|
|
|
|
|
|
<script src="./vendor/flipclock/flipclock.js"></script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div class="clock" style="margin:2em;"></div>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
var clock;
|
|
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
|
|
|
|
// Grab the current date
|
|
|
|
var currentDate = new Date();
|
|
|
|
|
|
|
|
// Set some date in the future.
|
2020-05-01 18:31:32 +02:00
|
|
|
var futureDate = new Date(2020, 6, 6, 12, 12);
|
2020-04-30 16:34:21 +02:00
|
|
|
|
|
|
|
// Calculate the difference in seconds between the future and current date
|
|
|
|
var diff = futureDate.getTime() / 1000 - currentDate.getTime() / 1000;
|
|
|
|
|
|
|
|
// Instantiate a coutdown FlipClock
|
|
|
|
clock = $('.clock').FlipClock(diff, {
|
|
|
|
clockFace: 'DailyCounter',
|
|
|
|
countdown: true
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|