title: Clear setInterval and prevent from glitching out
body: <p>I want to know if there is a way to restart/clear the setInterval(); function in Javascript?  My problem is, when you go here:: <a href="http://jsfiddle.net/GqrRx/2/" rel="nofollow">http://jsfiddle.net/GqrRx/2/</a> (sorry it doesn't want to work here)... but if you go there and input a date, it works fine. But if you enter in another date, the seconds, minutes, and hours glitch up, and flicker.  I think I need to find a way to restart the interval or stop it.</p>
  
  <p>I tried putting this at the top of my function, but it didn't seem to do anything.</p>
  
  <pre><code>clearInterval(runSeconds);
  clearInterval(runMinutes);
  clearInterval(runHours);
  </code></pre>
  
  <p>I also tried this:</p>
  
  <pre><code>var secInt = setInterval(runSeconds, 1000);
  var minInt = setInterval(runMinutes, 60000);
  var hInt = setInterval(runHours, 3600000);
  clearInterval(secInt);
  clearInterval(minInt);
  clearInterval(hInt);
  </code></pre>