Solved

Continuous countdown timer using jQuery or PHP

Posted on 2013-02-07
4
1,227 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

910 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now