1
I have a countdown function that works regularly on Google Chrome
var now = new Date();
var countTo = new Date("9 July 2015 14:30:00:00");
alert(countTo);
$('.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;
}
});
But I gave a alert(countTo);
in Firefox and got the message Invalid Date.
Basically this script serves to make the comparison with a date x and generate the countdown.
I think there’s an extra 00 on the date. try with
new Date("9 July 2015 14:30:00 GMT");
– Ricardo Moraleida