I currently have the following code:
var now = new Date();
var countTo = 50 * 24 * 60 * 60 * 1000 + now.valueOf();
$('.timer').countdown(countTo, function(event) {
var $this = $(this);
switch(event.type) {
case "seconds":
case "minutes":
case "hours":
case "days":
case "weeks":
case "daysLeft":
$this.find('span.'+event.type).html(event.value);
break;
case "finished":
$this.hide();
break;
}
});
Every time I reload the page the count starts again. I would need to set a specific date (14:30:00 08/01/2015) for comparison and countdown for that day.
The count is currently starting at 50 days.