开发者

Why is the jQuery countdown not working with the documented code?

I am using this jQuery countdown plugin here and it seems pretty straightforward but i must be missing something. Here is my code

$(document).ready(function(){
    var austDay = new Date();
    console.log(austDay.getFullYear() + 1);

    austDay = new Date(austDay.getFullYear() + 1, 1 - 1, 26);
    $('#countdown').countdown({until: austDay, fo开发者_运维百科rmat: 'dHMS'});
});

<div id="countdown"></div>

Here is the page


Your configuration was kind of messy. You configured the countdown plugin twice (in effect-ini.js and in a <script> tag in your HTML page). Also, you had syntax errors in your effect-ini.js.

  1. Remove the contents of your <script> tag in your index page (the one that starts with <script type="text/javascript" charset="utf-8">

  2. Replace your effect-ini.js with this: http://pastebin.com/ULtGSAUt

And it should work.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜