2.0.5
版本发布时间: 2015-07-25 03:29:35
hilios/jQuery.countdown最新发布版本:2.2.0(2016-08-08 20:23:54)
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});
1、 jquery.countdown-2.0.5.zip 5.7KB