jquery倒计时

js:jquery.countdown.min.js

css: animate/animate.min.css

<div class="panel panel-primary">
          <div class="panel-heading"><h3>jQuery倒计时</h3></div>
          <div class="panel-body text-center fixedheight">
          <h2 class="text-danger"><span class="glyphicon glyphicon-time"></span> <span id="countdown"></span></h2>
          </div>

</div>

 

倒计时5天

var first = new Date();
first.setDate(first.getDate()+5);
$('#countdown').countdown(first, function(event) {
    $(this).html(event.strftime('倒计时 %D 天 %H:%M:%S'));
})

posted @ 2017-05-17 17:57  梦中的太阳  阅读(139)  评论(0编辑  收藏  举报