user6013051
user6013051

Reputation:

jQuery countdown continue after date

I'm using this fantastic jQuery code here: http://hilios.github.io/jQuery.countdown/

I'm trying to make it work after the ending date. Do you have any idea? It should display something like:

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;')
   );
});

Thanks!

Upvotes: 0

Views: 146

Answers (1)

Odubuc
Odubuc

Reputation: 666

You have a few errors in your code.

Use the example given in the Doc, it works perfectly if you write it like this:

  $('#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;')
                   );
                });

I made a JsFiddle as an exemple

Upvotes: 1

Related Questions