title: JavaScript - setInterval only running once
body: <p><a href="http://jsfiddle.net/689nauny/" rel="nofollow">http://jsfiddle.net/689nauny/</a></p>
  
  <p>setInterval() is only running once... WTF is going on?</p>
  
  <p>SO is asking for more details but providing a JSFiddle is about as descriptive as I can be? I've tried using an anonymous function and now a callback. I just don't get it? :-/</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;script src="http://code.jquery.com/jquery-2.1.3.min.js"&gt;&lt;/script&gt;
  
  &lt;div id="qanda-timer-container"&gt;
      &lt;div class="qanda-timer"&gt;
          &lt;span id="qanda-time-remaining"&gt;&lt;/span&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>JS</p>
  
  <pre><code>    function intervalFunc(thinkingTime, answerTime)
      {
          jQuery('#qanda-time-remaining').text(''+(thinkingTime - 1));
      }
  
      function enableTimer(time)
      {
          var intervalID;
          var hasThinkingTime = true;
          var thinkingTime = time;
  
          var hasAnswerTime = true;
          var answerTime = 10;
  
          if(hasThinkingTime &amp;&amp; hasAnswerTime)
          {
              setInterval( intervalFunc(thinkingTime, answerTime), 1000);
          }
  
          setTimeout(function(){ 
  
              clearInterval(intervalID);
  
          }, time * 1000);
      }
  
  enableTimer(30);
  </code></pre>