View Full Version : A special Count down clock script

05-04-2012, 08:05 PM
Is there any script to count down at a particular date so that when the particular date is reached it restart counting to another date automatically.

05-04-2012, 08:58 PM
I don't know of anything specifically like that, but it would be easy to make. Just set the relevant date for the counter with an if statement, checking each of the dates you have to see if it has passed.

Or do you need this to happen during a single instance of the page? Count down, then reset, count down again, repeat? That would require adding a function to the end of it to restart it. Or you could just refresh the page when it finishes, if that could do what you want.

05-05-2012, 05:13 AM
There's always jQuery Countdown:


It can be configured to do just about anything you want including launching a new countdown once the original one has expired.

05-05-2012, 07:01 PM
I suspect one of these can be used.

It sounds like they would have to be altered to use multiple dates.I presume a javascript guru could help with that though.

05-13-2012, 06:54 PM
ok thanks for your replies.

Here is what i meant.

I have 2 events scheduled twice a week. One on wednesday and the second on saturday.

If i have a date say:

Next event date: Wednesday, May 16 2012 11:00 PM GMT-5

and on wednesday, the date will automatically switch to:

Next event date: Saturday, May 19 2012 11:00 PM GMT-5

and so on.

05-14-2012, 02:32 AM
Wouldn't you want to do this in a Server Side script rather than Client Side? It would be better to do it pre-compile rather than after/as the page has loaded.

It'd be easy enough in PHP to see if it is currently after 11:00 on Saturday and display the date for next Wednesday; or vice versa. Doing it like this would mean you don't have Javascript checking the time every millisecond to see if it needs to modify the page and slowing the site/browser down.

05-14-2012, 08:16 PM