Solved

Continuous countdown timer using jQuery or PHP

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
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)

762 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

16 Experts available now in Live!

Get 1:1 Help Now