Skip to content

Instantly share code, notes, and snippets.

@buzzedword
Forked from wayko/timer
Created October 20, 2011 19:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save buzzedword/1302157 to your computer and use it in GitHub Desktop.
Save buzzedword/1302157 to your computer and use it in GitHub Desktop.
timer
var newYear = new Date(new Date().getFullYear() + 1, 1 - 1, 1);
$(document).ready(function(){
$('#defaultCountdown').countdown({until: newYear});
$('#removeCountdown').toggle(function() {
$(this).text('Re-attach');
$('#defaultCountdown').countdown('destroy');
}, function() {
$(this).text('Remove');
$('#defaultCountdown').countdown({until: newYear});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment