JQuery倒计时器不倒计时

时间:2013-07-15 13:03:22

标签: ajax jquery countdown

我有一个jQuery倒计时器,必须从30:00分到00:00。但是在29:59显示并停留 这是我的代码:

var now = new Date();
var newDateObj = new Date(now.getTime() + 30 * 60 * 1000)
$("#countdowntimer").countdown({
    date: newDateObj.toGMTString(), //Counting TO a date
    htmlTemplate: "%{m}:%{s}",
    onComplete: function (event) {
        $(this).html("Completed");
    },
    leadingZero: true
});

PS:我正在使用jquery.jcountdown1.3.js插件

这里有什么问题?

2 个答案:

答案 0 :(得分:1)

我使用keith-wood倒计时为你创建了a jsbin。它可以做你想做的事,但api略有不同。

如果您有任何疑问,请告诉我

答案 1 :(得分:0)

如果您使用以下倒计时插件版本,您的代码似乎工作正常: https://github.com/tomgrohl/jQuery-plugins/raw/f0040f6e0c9942abac22590eccfa6f2897a61abf/countdown/script/jquery.jcountdown1.3.min.js

使用firefox测试....