title: Javascript JQuery countdown timer
body: <p>I'm trying to create a simple countdown timer to a date/time.</p>
  
  <p>I currently only have the following days to go script which is working fine:</p>
  
  <pre><code>&lt;div id="countdown"&gt;
  
  today = new Date();
  BigDay = new Date("March 29, 2013");
  msPerDay = 24 * 60 * 60 * 1000 ;
  timeLeft = (BigDay.getTime() - today.getTime());
  e_daysLeft = timeLeft / msPerDay;
  daysLeft = Math.floor(e_daysLeft);
  document.write(daysLeft + " days to go!");
  
  &lt;/div&gt;
  </code></pre>
  
  <p>I'm now trying to create a full countdown timer (with hours, minutes and seconds) and have created the following script. The html isn't showing on the page.</p>
  
  <pre><code>var today = new Date();
  var BigDay = new Date("29 03 2013, 14:30:00");
  var msPerDay = 24 * 60 * 60 * 1000 ;
  var timeLeft = (BigDay.getTime() - today.getTime());
  var e_daysLeft = timeLeft / msPerDay;
  var daysLeft = Math.floor(e_daysLeft);
  var e_hrsLeft = (e_daysLeft - daysLeft)*24;
  var hrsLeft = Math.floor(e_hrsLeft);
  var e_minsLeft = (e_hrsLeft - hrsLeft)*60;
  var minsLeft = Math.floor(e_minsLeft);
  var e_secsLeft = (e_minsLeft - minsLeft)*1000;
  var secsLeft = Math.floor(e_secsLeft);
  var timeString = daysLeft + " : " + hrsLeft + " : " + minsLeft + " : " + secsLeft;
  
  $('document').ready(function(){
  
  window.setInterval(function(){
  $('#countdown').html(timeString);
  }, 1000);
  
  });
  </code></pre>
  
  <p>I'm not sure what the problem might be. The first script is contained within the html, the second is an external js file.</p>
  
  <p>Edit: html is now showing however all values are displayed as NaN.</p>