我有一個jQuery倒計時器,它必須從30:00分鐘到00:00計數。但顯示在29:59 這裏stucked是我的代碼:JQuery倒計時器不倒計時
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
插件
這裏有什麼問題?
你正在使用哪個倒計時插件? –
據我所知,jQuery沒有提供倒計時方法。你使用什麼插件? – cbillowes
參考這個插件http://keith-wood.name/countdown.html – Kathiravan