hi i have a script and i have it on my site http://www.l2-ee.com/test/ but if you push every time on refresh he start from the beginning and if i type the date and hours,minutes,seconds he dont give the good date en time left :S so can you ppl please help me?? here is the code
// Here’s where the Javascript starts
var countdown = +27190000;
var $display = [
['',''], // 0
['',''], // 1
['',''], // 2
['',''] // 3
];
// Converting date difference from seconds to actual time
function convert_to_time(secs)
{
secs = parseInt(secs);
hh = secs / 3600;
hh = parseInt(hh);
mmt = secs - (hh * 3600);
mm = mmt / 60;
mm = parseInt(mm);
ss = mmt - (mm * 60);
// Our function that will do the actual countdown
function do_cd()
{
if (countdown < 0){}
else {
convert_to_time(countdown);
setTimeout(function(){do_cd();}, 1000);
}
countdown = countdown - 1;
}
$(document).ready(function(){
$display[0][0] = $('#display_0-0');
$display[0][1] = $('#display_0-1');
Bookmarks