github hilios/jQuery.countdown 2.0.5
v2.0.5

latest releases: 2.2.0, 2.1.0
8 years ago

What's new in 2.0.5?

  • Allow precision controls through an options object;
  • Allow to continue after countdown finishes;
  • Don't dispatch events when nothing changes;

Continue

var fiveSecsAgo = new Date().getTime() + 5000;
$('#clock').countdown(fiveSecsAgo, {elapse: true}).on('update.countdown', function(event) {
    $this = $(this);
    if (event.elapsed) {
        $this.html(event.strftime('%S seconds from finish!'));
    } else {
        $this.html(event.strftime('%S seconds till finish...'));
    }
});

Control precision

// Update every second
$('#clock').countdown('YYYY/MM/DD', {precision: 1000});

Don't miss a new jQuery.countdown release

NewReleases is sending notifications on new releases.