javascript - countdown is not counting down as expected -


hoping this, i'm not js expert.

i have countdown set up, adapted keith wood's countdown. it's not counting down in browser, though seems functioning in every other regard.

here on jfiddle.

and here's code:

html:

<div id="form">     <div id="topbox">         <div class="countdown"></div>         <div id="until">             until move-in         </div>     </div> </div> 

js:

$(document).ready(function() {      //preload rollover image     var image = $('<img />').attr('src', '../../images/countdown_button1.png');      // jqueryui calls buttons     $(".back a").button({         icons: {primary: "ui-icon-triangle-1-w"}     });      // checklist button rollover     $('#bottombox a').hover(         function () {             $('#bottombox').addclass("button").removeclass("nobutton");         }, function () {             $('#bottombox').addclass("nobutton").removeclass("button");         }     );      // start instance of countdown     $('.countdown').countdown({until: new date(2014, 9-1, 21, 10), layout:          '<ul class="countdown-tabs"><li><a>{dn} <span>{dl}</span></a></li>' +          '<li><a>{hn} <span>{hl}</span></a></li>' +          '<li><a>{mn} <span>{ml}</span></a></li>' +          '<li class="last-child"><a>{sn} <span>{sl}</span></a></li></ul>'});      $('.bg-switcher input').change(function () {         // set background photo value of photo-switcher         window.location.hash = $(this).attr('id');         var photo = "url('/images/countdown_" + $(this).attr('id') + ".jpg')";         $('#canvas').css('background-image', photo);     });  });  function setphoto() {     if(window.location.hash === "" || window.location.hash === "#one") {         $('#one').attr("checked", "checked");         $(".bg-switcher").buttonset();     } else {         // grab value of url hash         var urlhash = window.location.hash.substring(1);          // set background photo value in url hash         var urlphoto = "url('/images/countdown_" + urlhash + ".jpg')";         $('#canvas').css('background-image', urlphoto);          $('#' + urlhash).attr("checked", "checked");         $(".bg-switcher").buttonset();     } }; 

i'm calling:

<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script> <script type="text/javascript" src="/js/jquery.countdown.js"></script> <script type="text/javascript" src="/js/jquery.plugin.js"></script> 

any ideas on how count down? appreciate it!

you don't calling actual countdown script indicated on website took script from:

~2. download , include jquery countdown css , javascript in head section of page.

<link rel="stylesheet" type="text/css" href="css/jquery.countdown.css">  <script type="text/javascript" src="js/jquery.plugin.js"></script>  <script type="text/javascript" src="js/jquery.countdown.js"></script> 

edited: other that, check developer tool of browser errors , try fix them all. might not related directly this, may prevent execution of rest of script.


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -