Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

javascript / jquery time count down

I want to make a function either using pure Javascript or also benefiting from jquery to count down to an ending time such as:

//consumes a javascript date object
function countDown(endtimme){
...
}

and it should display in html such as

<div id="time_left_box">
    <h1>Time remaining</h1>:

    <p>hours left: ..remaining day will be here## <p>
    <p>minutes left: ##remaining day will be here## <p>
    <p>seconds left: ##remaining day will be here## <p>
</div>

Indeed and it would be even more great if it can refresh itself every second.

I am very naive with javascript and confused about how to approach, any help would be appreciate.

like image 204
Hellnar Avatar asked Feb 08 '10 13:02

Hellnar


2 Answers

You could use jQuery Countdown

like image 65
marcgg Avatar answered Sep 20 '22 02:09

marcgg


Take a look at this one: http://keith-wood.name/countdown.html

like image 36
Jeff Maes Avatar answered Sep 20 '22 02:09

Jeff Maes