#1
  1. A Change of Season
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    3,558
    Rep Power
    221

    Moment countdown timer never hits zero!


    Hello;

    I have a countdown timer that works well only 2 small issues:

    1 - When it hits 1 second before expiry time, it stops and never shows zero. So I can't redirect

    2 - If you visit the page after the expiry time, it doesn't show any values. I have php in the middle to manage redirects however, the users may get direct link.

    Here is the fiddle https://jsfiddle.net/dxcetLpn/4/

    You can test both above scenarios.

    How can I get it to hit zero and also how to get it to show zero if they visit the page after the expiry time?

    Thanks
  2. #2
  3. Backwards Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    16,904
    Rep Power
    9646
    The update.countdown event only fires up to the last second. You have to use the finish.countdown event too. It also seems to fire when the time is in the past.
    javascript Code:
    $(".days, .hours, .minutes, .seconds").text("0");

IMN logo majestic logo threadwatch logo seochat tools logo