我想设置倒计时到1月1日2017年。但刷新页面时,倒计时复位,并开始24天后再次计数23小时50分钟.. check the image时间重置jQuery的优雅倒计时刷新页面时
$(document).ready(function() {
$('#countdown4').ClassyCountdown({
end: $.now() + 2160000,
labels: true,
style: {
element: "",
textResponsive: .5,
days: {
gauge: {
thickness: .03,
bgColor: "rgba(255,255,255,0.05)",
fgColor: "#1abc9c"
},
textCSS: 'font-family:\'Open Sans\'; font-size:25px; font-weight:300; color:#fff;'
},
hours: {
gauge: {
thickness: .03,
bgColor: "rgba(255,255,255,0.05)",
fgColor: "#2980b9"
},
textCSS: 'font-family:\'Open Sans\'; font-size:25px; font-weight:300; color:#fff;'
},
minutes: {
gauge: {
thickness: .03,
bgColor: "rgba(255,255,255,0.05)",
fgColor: "#8e44ad"
},
textCSS: 'font-family:\'Open Sans\'; font-size:25px; font-weight:300; color:#fff;'
},
seconds: {
gauge: {
thickness: .03,
bgColor: "rgba(255,255,255,0.05)",
fgColor: "#f39c12"
},
textCSS: 'font-family:\'Open Sans\'; font-size:25px; font-weight:300; color:#fff;'
}
},
onEndCallback: function() {
console.log("Time out!");
}
});
});
检查代码中,我使用
,你可以分享你什么尝试? –
我不知道你想要什么。你为什么要倒数到2016年1月1日 - 这是过去。你的结局总是从现在起25天:end:$ .now()+ 2160000 - 请告诉我们,你到底想要什么。 – Seb
对不起,coutdown日期是2017年1月1日 –