Skip to content

Instantly share code, notes, and snippets.

@cacheleocode
Created June 27, 2013 19:55
Show Gist options
  • Select an option

  • Save cacheleocode/5879806 to your computer and use it in GitHub Desktop.

Select an option

Save cacheleocode/5879806 to your computer and use it in GitHub Desktop.
with a check for time zones
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="style.css">
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/script.js"></script>
<script type="text/javascript" src="js/jquery.countdown.js"></script>
<script type="text/javascript" src="js/jstz-1.0.4.min.js"></script>
<script type="text/javascript" src="AppleClasses/AppleWidget.js"></script>
<script>
$(function () {
var tz = jstz.determine();
var premiere = new Date();
if(tz.name() == "America/Caracas")
{
premiere = new Date(2013, 7 - 1, 15, 22, 30);
}
else
{
premiere = new Date(2013, 7 - 1, 15, 22);
}
$('#premiere').text(premiere);
$('#countdown').countdown({
until: premiere,
layout: '<div class="group"><div class="digits">{dnn}.</div></div></div>' +
'<div class="group"><div class="digits">{hnn}.</div></div></div>' +
'<div class="group"><div class="digits">{mnn}.</div></div></div>' +
'<div class="group"><div class="digits">{snn}</div></div></div>'
});
});
</script>
</head>
<body onselectstart="return false;">
<div id="stage">
<div id="countdown">
</div> <!-- #countdown -->
</div> <!-- #stage -->
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment