title: What is the right jQuery (or javaScript) code to pause a basic slider using a simple 'setTimeOut' funcitonality?
body: <p>I have built a basic content slider, based upon a tutorial I got from the web.</p>
  
  <p>In the example, the slides scroll on a timed interval using a <code>setTimeout</code> parameter, but also has a navigation functionality (of course) which allows you to go to selected slides directly.</p>
  
  <p>The slides scroll without pausing the <code>Timeout</code> when a slide is selected and obviously when the mouse hovers.</p>
  
  <p>The <strong><em>key</em></strong> javaScript/jQuery code which controls the scrolling is essentially (7 total slides):</p>
  
  <pre><code>var currentSlide = 0;
  
  function slideScroll(){
      if (currentSlide == 7)
      selectSlide(1);
  else
      selectSlide( currentSlide + 1 );
  
  setTimeout ('slideScroll()', 4000);
  
  }
  </code></pre>
  
  <p>((<em>Other javaScript code omitted because I was fairly certain that the key is this function, but I can certainly update my question with the precursory code if needed for clarity.</em>))</p>
  
  <p>The end game is <strong>a)</strong> to have the <code>Timeout</code> reset whenever a user selects a new slide and <strong>b)</strong> to have the <code>Timeout</code> pause when a mouse is rolled over the content in the slide.</p>
  
  <p>I presume that the code ought to be inserted in conjunction with the <code>setTimeout</code>, with some <code>if</code> statements or something. Can someone help me devise this solution for endgame <strong>a)</strong> and <strong>b)</strong> ?</p>
  
  <p>Live prototype and <strong><em>NOT</em></strong> a shameless plug: <a href="http://www.bcw.se/3point0/" rel="nofollow">HERE</a></p>
  
  <p>Thanks in advance for tips!</p>