Skip to content

Instantly share code, notes, and snippets.

@catalin586
Last active February 23, 2016 08:26
Show Gist options
  • Save catalin586/f514a5e51aa3a9e27679 to your computer and use it in GitHub Desktop.
Save catalin586/f514a5e51aa3a9e27679 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<style>
ul#myCounter li { display: inline-block; }
</style>
</head>
<body>
<ul id="myCounter">
<li><span class="hours"></span> :</li>
<li><span class="minutes"></span> :</li>
<li><span class="seconds"></span></li>
</ul>
<script src="https://code.jquery.com/jquery-2.2.0.min.js"></script>
<script src="jquery.countdown.js?v=1.0.0.0"></script>
<script type="text/javascript">
var d = new Date();
var month = d.getMonth()+1;
var day = d.getDate();
var year = d.getFullYear();
var day_in_week = d.getDay();
var hour = (day_in_week == 5 ? 14-1 : 17-1);
var minute = 30;
var second = 00;
var s1 = '/';
var s2 = ':';
var output = month+s1+day+s1+year+ ' ' +hour+s2+minute+s2+second;
$('#myCounter').countdown({
date: output
}, function () {
alert('Go home now...you must be very tired!');
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment