There is such a script. In the safari browser shows Nan

<script src="https://cdn.jsdelivr.net/jquery.countdown/2.2.0/jquery.countdown.min.js" type="text/javascript"></script> <script> $('body').countdown('10/31/2016 24:00:00') .on('update.countdown', function(event) { $('.years').html(event.strftime('%Y')) $('.months').html(event.strftime('%m')) $('.weeks').html(event.strftime('%w')) $('.days').html(event.strftime('%D')) $('.hours').html(event.strftime('%H')) $('.minutes').html(event.strftime('%M')) $('.seconds').html(event.strftime('%S')); }) .on('finish.countdown', function(event) { window.location.href = 'http://www.studio-073.nl/cwsyn/deadline-expired.html'; }); </script> 

The script works fine in this case:

  <script src="https://cdn.jsdelivr.net/jquery.countdown/2.2.0/jquery.countdown.min.js" type="text/javascript"></script> <script> $('body').countdown('02/07/2020 11:05:00') .on('update.countdown', function(event) { $('.years').html(event.strftime('%Y')) $('.months').html(event.strftime('%m')) $('.weeks').html(event.strftime('%w')) $('.days').html(event.strftime('%D')) $('.hours').html(event.strftime('%H')) $('.minutes').html(event.strftime('%M')) $('.seconds').html(event.strftime('%S')); }) .on('finish.countdown', function(event) { window.location.href = 'http://example.com/'; }); </script> 

I do not understand which way to dig, read about the formats, changed. Still going on problems.

    1 answer 1

     $('body').countdown('10/31/2016 24:00:00') 

    I think you set in the 2016 year, and it seems to be over)

    Try to put 2017

    • All right The trick is that the year is over and then I had to throw it over. I tested and sort of earned this format: 2016/10/31 00:00:00 - Nikita Severin
    • Edit the condition and specify what you need to throw on the specified link, and not what is specified initially. Because I thought the problem was in NaN - Sergey Novikov
    • Updates are added to the comment. Your reputation allows you to clarify. Code can be written in `` brackets. - nick_n_a
    • Yes perekidyvalo. But in the safari on the timer shows NaN) And as a result, nan does not transfer. If you set the time for the future, the timer works, but will it work? - Nikita Severin