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.
Remove the contents of your
<script>
tag in your index page (the one that starts with<script type="text/javascript" charset="utf-8">
Replace your effect-ini.js with this: http://pastebin.com/ULtGSAUt
And it should work.
精彩评论