title: Javascript clearInterval and setInterval() acting not as expected
body: <pre><code>var timer = 0
  var startInterval = function( value ) {
      timer = setInterval( "checkNewPost();", value );
  }
  var stopInterval = function() {
      clearInterval( timer );
  }
  
  jQuery("#centerColumn a").click(function() {
      var a_id = jQuery(this).attr("id");
      var splitValue = a_id.split("-");
      var newValue = splitValue[1];
  
      if( newValue == "30" ) { 
          stopInterval;
          startInterval( 10000 );
      }
      else if( newValue == "1" ) {
          stopInterval;
          startInterval( 20000 );
      }
      else if( newValue == "5" ) {
          stopInterval;
          startInterval( 30000 );
      }
      else if( newValue == "pause" )
          stopInterval;
  });
  </code></pre>
  
  <p>As you can see in my code, the logic is pretty straight forward, when newvalue is equal to 30 it will stop the current interval and restart it with a 10000 seconds on the setInterval. And when newValue is equal to pause, it will stop all the setInterval.</p>
  
  <p>The problem here is it does not act correctly, i'm not sure why? Can someone guide me on this. Your help would be greatly appreciated! </p>
  
  <p>Thanks! :)</p>