2012-07-20 66 views
2

我在网站timeshift.co上工作,我安装了Keiths Woods的jquery倒计时。它在Chrome上运行完美,但在IE,Mozilla,iPad和iPhone中无法正常工作。 倒数完美计数直到10.1.2012。它显示72天7小时等等。在其他浏览器上,它显示NaN天,NaN小时等。jQuery倒计时Keith Wood不在mozilla工作

我有以下的html:

<html> 
<head> 
    <script type="text/javascript" src="jquery.js"></script> 
    <script type="text/javascript" src="jquery.countdown.min.js"></script> 
    <script type="text/javascript" src="scripts.js"></script> 
    <link rel="stylesheet" type="text/css" href="style.css" media="screen" /> 
    <link rel="stylesheet" type="text/css" href="jquery.countdown.css" media="screen" /> 
</head> 
<body> 
    <div class="body"> 
     <div class="countdown"></div> 
     <div class="logo"></div> 
    </div> 
</body> 
</html> 

里面scripts.js我:

$(document).ready(function(){ 
    var date = new Date('10.1.2012'); 
    $('.countdown').countdown({until: date , format: 'DHMS'}); 
}); 

有什么不对jquery.countdown.min.js?我不知道该怎么做。

+0

有人吗?需要帮助。 – 2012-07-20 14:01:24

回答

3

尝试脱帽的Dd

$('.countdown').countdown({until: date , format: 'dHMS'}); 

因为同样是在homepage of the plugin完成:

$(selector).countdown({until: liftoffTime, format: 'dHM'}); 

编辑:更改为以下,it works for me in Safari

var date = new Date(2012, 10-1, 1); 

该条款的解析g可能在除Chrome以外的浏览器中出错。

+0

没有没有工作:(谢谢你的尝试 – 2012-07-20 14:09:16

+0

更新了我的答案。 – Calavoow 2012-07-20 14:26:17

+0

谢谢谢谢谢谢!您好帮助。 – 2012-07-20 14:29:50

3

检查你的日期。 如果你的日期是前。 “2012年2月23日23时22分22秒” 更改为“2012年2月23日23时22分22秒”

使用斜线或者iphone Mozilla不会抱怨

+0

谢谢,这是我为这个问题的版本。 – 2012-12-06 21:23:16