2

私はこのコードを持っています:

$(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>')
                );
            });

    });

しかし、カウントダウンがいつ終了するかを知る方法がわかりません。助けてください。

4

1 に答える 1

1

これを試して ...

$(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.
    });

});
于 2016-11-21T19:40:22.537 に答える