倒计时jquery无法正常工作

时间:2013-07-09 12:28:55

标签: javascript jquery

我在Sharepoint 2010网站上有以下代码,其中包含特定日期的倒计时。它呈现但它不动,它就在那里。我想知道这段代码有什么不妥。

<

script class="ms-rteForeColor-3" type="text/javascript">


$(function () {
    var austDay = new Date(2013, 7 - 1, 27);
    $('#countdown').countdown({until: austDay});
    });</script><div id="countdownBox"><h3 class="ms-rteElement-H3 ms-rteForeColor-3">Countdown to go-live</h3>
<div class="hasCountdown" id="countdown" jquery16409200090109471424="11"><span class="countdown_row countdown_show4"><span class="countdown_section"><span class="countdown_amount">24</span><br/>Days</span><span class="countdown_section"><span class="countdown_amount">13</span><br/>Hours</span><span class="countdown_section"><span class="countdown_amount">31</span><br/>Minutes</span><span class="countdown_section"><span class="countdown_amount">59</span><br/>Seconds</span></span></div></div>

1 个答案:

答案 0 :(得分:2)

如果您还没有包含倒计时插件download it并同时包含css和js文件。

您的标记应该像

一样简单
<span id="countdown"></span>

演示:Fiddle