日期之后jQuery倒计时继续

时间:2016-06-03 18:24:04

标签: javascript jquery jquery-countdown

我在这里使用这个梦幻般的jQuery代码: http://hilios.github.io/jQuery.countdown/

我试图在结束日期之后使其工作。 你有什么主意吗? 它应该显示如下内容:

  

3 semaines soit 10 heures et 10 minutes

$('#timeout').countdown(finalDate, {elapse: true})
.countdown("2015/05/01 12:00:00", function(event) {
     $(this).text(
       event.strftime('%-w %!w:semaine,semaines; soit %-D %!D:jour,jours; et %-H %!H:heure,heures;')
   );
});

谢谢!

1 个答案:

答案 0 :(得分:1)

您的代码中有一些错误。

使用Doc中给出的示例,如果您这样写,它的效果非常好:

  $('#timeout').countdown("2015/05/05 12:00:00", {elapse: true})
               .on('update.countdown', function(event) {
                   $(this).text(
                       event.strftime('%-w %!w:semaine,semaines; soit %-D %!D:jour,jours; et %-H %!H:heure,heures;')
                   );
                });

我做了JsFiddle作为例子

相关问题