Search code examples
javascriptjquerycountdown

When i reload the page, the countdown reload to


How to keep time on the jquery.countdown plugin?

The countdown run correctly, but when i reload the page, the countdown reload to, and i want to keep the countdown when i reload, what i should do?

http://jsfiddle.net/wtkd/CUSnS/


Solution

  • its initialized after the DOM is ready, and therefore you cannot keep the remaining time, you can grab the current time of your server and, say echo it in a javascript variable and update the time of countdown.