Skip to content

Instantly share code, notes, and snippets.

@wayko
Created October 20, 2011 19:52
Show Gist options
  • Save wayko/1302149 to your computer and use it in GitHub Desktop.
Save wayko/1302149 to your computer and use it in GitHub Desktop.
timer
var newYear = new Date();
newYear = new Date(newYear.getFullYear() + 1, 1 - 1, 1);
$('#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