title: jQuery Automatic page scroll with HTML slider to control animation speed
body: <p>I've been looking around and I think I'm fairly close to getting this but when I move my slider to alter the speed of the animation, nothing seems to happen. I'm assuming this has something to do with the animation already in progress? Here's the code I have thus far:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script src="jquery-1.10.1.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  
  function pageScroll(speed)
  {
      $("html, body").animate({ scrollTop: $(document).height() }, speed);    
  }
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;body onLoad="pageScroll(100000);"&gt;
  
  &lt;input onChange="pageScroll(this.value);" type="range" value="100000" name="slider" min="0" max="200000"  style="position:fixed; left:0;top:0"&gt;
  
  &lt;center&gt;&lt;img src="page-0.jpg" width="800"&gt;
  &lt;img src="page-1.jpg" width="800"&gt;
  &lt;img src="page-2.jpg" width="800"&gt;
  &lt;img src="page-3.jpg" width="800"&gt;&lt;/center&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>