javascript countdown timer with cookies -


I have a countdown clock that will show a target amount for the amount of USD1000000 and gradually count The duration of the day. I found this snippet:

  $ (function () {var cnt = 75000000; var count = setInterval (function () {if (cnt> 0) {$ ('# target ') $ (' # Target '). (" KSHS  " + cnt + "target & lt; / strong & gt; ); Cnt--; other {clear} .html ("get strong & gt; target!"; / Strong> gt;))}}, 4000);});  

The only problem is that whenever you refresh the page the counter resumes, which essentially means it will never end.

I like that when the user continues the counter and continues the page / refreshes I have read that JavaScript cookies can be used for this, just do not know how How to do any help?

Take a look at this:


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -