Solved

Continuous countdown timer using jQuery or PHP

Posted on 2013-02-07
4
1,234 Views
Last Modified: 2013-02-07
I am looking for a countdown timer that resets when it reaches 00:00:00

Basically I need it to set it the countdown from 12am to 2pm.

I'm new to jQuery and have not seen a script that does this yet...

If anyone knows I'd be grateful for the shared knowledge...
0
Comment
Question by:rafique12
  • 2
  • 2
4 Comments
 
LVL 5

Accepted Solution

by:
Pyromanci earned 500 total points
ID: 38864811
The best solution really depends on what you using the countdown timer for, if the count down is suppose to be continue through page loads, if it's based on server time or client time.

There are a few different solutions you can use. Most of which are pretty flexible.

http://keith-wood.name/countdown.html Is a jquery based system and you can easy make it functional with php by doing something like:
$('#timer').countdown({
    until: '<?php echo date("h:i:s"); ?>' // change this, obviously
});

Open in new window

0
 

Author Comment

by:rafique12
ID: 38864827
Thanks for the link, It would be based on server time the thing is I need to reset when it reaches zero and start counting down again!
0
 
LVL 5

Expert Comment

by:Pyromanci
ID: 38864858
Then the little code snippet I included should work nicely for you as a starting point.
0
 

Author Closing Comment

by:rafique12
ID: 38864888
Thankyou!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question