倒計時腳本,如果我重新加載頁面,重新開始。我需要將它設置到某個日期。倒計時如果我重新加載頁面 - - 需要設置它,直到某個日期
這裏是鏈接,倒數計時器視圖,你也可以下載並使用它或看到代碼:https://timer.craftovdvlp.club/
這裏是腳本:
$(document).ready(function() {
$('#countdown2').ClassyCountdown({
end: '1388468325',
now: '1378441323',
labels: true,
style: {
element: "",
textResponsive: .5,
days: {
gauge: {
thickness: .01,
bgColor: "rgba(0,0,0,0.05)",
fgColor: "#1abc9c"
},
textCSS: 'font-family:\'Open Sans\'; font-size:25px; font-weight:300; color:#34495e;'
},
hours: {
gauge: {
thickness: .01,
bgColor: "rgba(0,0,0,0.05)",
fgColor: "#2980b9"
},
textCSS: 'font-family:\'Open Sans\'; font-size:25px; font-weight:300; color:#34495e;'
},
minutes: {
gauge: {
thickness: .01,
bgColor: "rgba(0,0,0,0.05)",
fgColor: "#8e44ad"
},
textCSS: 'font-family:\'Open Sans\'; font-size:25px; font-weight:300; color:#34495e;'
},
seconds: {
gauge: {
thickness: .01,
bgColor: "rgba(0,0,0,0.05)",
fgColor: "#f39c12"
},
textCSS: 'font-family:\'Open Sans\'; font-size:25px; font-weight:300; color:#34495e;'
}
},
onEndCallback: function() {
console.log("Time out!");
}
});
});
<link href="http://timer.craftovdvlp.club/css/jquery.classycountdown.css" rel="stylesheet" />
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="http://timer.craftovdvlp.club/js/jquery.classycountdown.js"></script>
<script src="http://timer.craftovdvlp.club/js/jquery.knob.js"></script>
<script src="http://timer.craftovdvlp.club/js/jquery.throttle.js"></script>
<div class="container">
<div id="countdown2" class="ClassyCountdownDemo"></div>
</div>
附:如果有人有或知道美麗的線循環倒數計時器的鏈接,我將非常感謝幫助)
你是什麼意思 「重新開始」?似乎你已經爲'現在'硬編碼了值 - 如果你想讓倒計時保持相對於你的端點,現在不應該把'now'設置爲...好了...... *現在*?此外,您應該爲此插件託管'.js'文件,並在代碼段中使用「添加外部庫」工具,以便您的問題可以重現。 – Santi
現在我添加了所有包含。是的,我現在在文件** http://timer.craftovdvlp.club/js/jquery.classycountdown.js**,即使我添加日期和寫入格式ON,仍然看不到日期和工作相同或chrashs – Orik3ll0