如何设置7天倒计时keith-wood Jquery倒计时插件

时间:2016-03-03 15:20:48

标签: jquery jquery-countdown

我正在使用基思伍德jquery倒计时插件,我即将推出的页面,我想添加7天10小时40分钟的倒计时。您可以在http://keith-wood.name/countdown.html

找到更多信息

这是我的代码:

function countdown () {

    // src: http://keith-wood.name/countdown.html
    layout = $('.timer').html();
    var newYear = new Date(); 
    newYear = new Date(newYear.getDate() + 7, 1 - 1, 1); 
    $('.timer').countdown({until: newYear, layout: layout}); 

}

提前致谢!

1 个答案:

答案 0 :(得分:0)

Use this code:

function countdown () {

    layout = $('.timer').html();
    date =  new Date("2016-05-20T13:00:00");
    var d = new Date(0);
    d.setUTCSeconds(date);
    $('.timer').countdown({until: date, layout: layout}); 


}