title: Multiple JS countup timers on one page from specific dates
body: <p>I have got a countup timer that counts up from a certain date.
  <a href="http://jsfiddle.net/eyntL8go/" rel="nofollow">http://jsfiddle.net/eyntL8go/</a></p>
  
  <p>I am now trying to adapt this so that I can have multiple timers on a page. I have written the below code, but it doesn't work. Can anyone see the error?</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div class="countup"&gt;
      &lt;div id="targetdate" style="display: none"&gt;Thu Jan 01 1970 00:44:39 +0000&lt;/div&gt;
      &lt;div id="timer"&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="countup"&gt;
      &lt;div id="targetdate" style="display: none"&gt;Thu Jan 01 1970 00:44:49 +0000&lt;/div&gt;
      &lt;div id="timer"&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>$('.countup').each(function() {
      var targetdate = $(this).children('#targetdate').innerHTML;
      var seconds_left = new Date(targetdate).getTime();
      var timer = $(this).children('#timer').innerHTML;
      var minutes, seconds;
  
      seconds_left = seconds_left / 1000;
  
      var countdownrefesh = setInterval(function () {
          // Add one to seconds
          seconds_left = seconds_left + 1;
  
          // do some time calculations
          days = parseInt(seconds_left / 86400);
          seconds_left = seconds_left % 86400;
  
          hours = parseInt(seconds_left / 3600);
          seconds_left = seconds_left % 3600;
  
          minutes = parseInt(seconds_left / 60);
          seconds = parseInt(seconds_left % 60);
  
          // format countdown string + set tag value
          timer = hours + "h:" + minutes + "m:" + seconds + "s";  
  
      }, 1000);
  });
  </code></pre>