检查倒计时是否结束
Check if countdown end
我有这个代码:
$(document).ready(function(){
$("#CDT")
.countdown("{{ aReturn.sAuctionEndDate }}", function(event) {
$(this).html(
event.strftime('' +
'<span class="number-wrapper" style="float: left"><div class="line"></div><div class="caption">Day</div><span class="number day">%D</span></span>' +
'<span class="number-wrapper" style="float: left"><div class="line"></div><div class="caption">Hour</div><span class="number hour">%H</span></span>' +
'<span class="number-wrapper" style="float: left"><div class="line"></div><div class="caption">Minute</div><span class="number min">%M</span></span>' +
'<span class="number-wrapper" style="float: left"><div class="line"></div><div class="caption">Second</div><span class="number sec">%S</span></span>')
);
});
});
但我不知道如何知道倒计时何时结束。你能帮帮我吗?
试试这个...
$(document).ready(function(){
$("#CDT")
.countdown("{{ aReturn.sAuctionEndDate }}", function(event) {
$(this).html(
event.strftime('' +
'<span class="number-wrapper" style="float: left"><div class="line"></div><div class="caption">Day</div><span class="number day">%D</span></span>' +
'<span class="number-wrapper" style="float: left"><div class="line"></div><div class="caption">Hour</div><span class="number hour">%H</span></span>' +
'<span class="number-wrapper" style="float: left"><div class="line"></div><div class="caption">Minute</div><span class="number min">%M</span></span>' +
'<span class="number-wrapper" style="float: left"><div class="line"></div><div class="caption">Second</div><span class="number sec">%S</span></span>')
);
})
.on('finish.countdown', function() {
// do something when countdown finished.
});
});
我有这个代码:
$(document).ready(function(){
$("#CDT")
.countdown("{{ aReturn.sAuctionEndDate }}", function(event) {
$(this).html(
event.strftime('' +
'<span class="number-wrapper" style="float: left"><div class="line"></div><div class="caption">Day</div><span class="number day">%D</span></span>' +
'<span class="number-wrapper" style="float: left"><div class="line"></div><div class="caption">Hour</div><span class="number hour">%H</span></span>' +
'<span class="number-wrapper" style="float: left"><div class="line"></div><div class="caption">Minute</div><span class="number min">%M</span></span>' +
'<span class="number-wrapper" style="float: left"><div class="line"></div><div class="caption">Second</div><span class="number sec">%S</span></span>')
);
});
});
但我不知道如何知道倒计时何时结束。你能帮帮我吗?
试试这个...
$(document).ready(function(){
$("#CDT")
.countdown("{{ aReturn.sAuctionEndDate }}", function(event) {
$(this).html(
event.strftime('' +
'<span class="number-wrapper" style="float: left"><div class="line"></div><div class="caption">Day</div><span class="number day">%D</span></span>' +
'<span class="number-wrapper" style="float: left"><div class="line"></div><div class="caption">Hour</div><span class="number hour">%H</span></span>' +
'<span class="number-wrapper" style="float: left"><div class="line"></div><div class="caption">Minute</div><span class="number min">%M</span></span>' +
'<span class="number-wrapper" style="float: left"><div class="line"></div><div class="caption">Second</div><span class="number sec">%S</span></span>')
);
})
.on('finish.countdown', function() {
// do something when countdown finished.
});
});