title: jquery animate, set interval and inactive window issue
body: <p>So I have this weird issue that i am hitting, i have a slide show in which set interval fires up jquery animate method. all works great.</p>
  
  <p>Until i switch tabs. If i switch back to tab with slideshow in some time, all of the sudden animation is fired repeatedly, with out any inteval in place. Like it is playing catch up.</p>
  
  <p>I kind of figured that it has something to do with RequestAnimationFrame and jQuery's animate method. And how animation rendering is suppressed while tab is inactive. While interval is kept on firing up every so often, even when window is inactive.</p>
  
  <p>Could any one elaborate more on this, would much appreciate it. </p>
  
  <p>Here is the core code that does that:</p>
  
  <pre><code>function animate(setCurrent){
      animationDistance = opt.cSlideWidth * (opt.cCurrentSlide - 1);
      carousel.animate({left: '-' + animationDistance}, opt.cTransitionSpeed});
  }
  opt.cSetUpIntervalMethod = function(action){
      if (action === 'start') {
          clearInterval(opt.cSlideTimer);
          opt.cSlideTimer = setInterval(function(){animate();},opt.cSlideDelay);
      }
  }
  opt.cSetUpIntervalMethod('start');
  </code></pre>