Created
April 23, 2016 19:07
-
-
Save mpaccione/eb4dbb09ebe1846cafe2e4e9fb4d062c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("#countdown").countdown("2016/08/01 12:34:56").on('update.countdown', function(event) { | |
var d = '%D days', | |
h = '%H hours', | |
m = '%M minutes', | |
s = '%S seconds'; | |
if(event.offset.days > 0) { d = '%-d day%!d'; } | |
if(event.offset.hours > 0) { h = '%-h hour%!h'; } | |
if(event.offset.minutes > 0) { m = '%-m minute%!m'; } | |
if(event.offset.seconds > 0) { s = '%-s seconds%!s'; } | |
var format = d+" "+h+" "+m+" "+s; | |
$(this).html(event.strftime(format)); | |
}).on('finish.countdown', function(event) { $(this).html('Next Datathon Date To Be Determined').parent().addClass('disabled'); }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment