title: $(window).scroll in vanilla JavaScript
body: <ol>
  <li><p>What's the equivalent of the following in plain JS?</p>
  
  <p><code>$(window).scroll(function() { });</code></p></li>
  <li><p>I'm also looking to animate scroll, e.g.:</p>
  
  <p><code>$('html, body').animate({scrollTop:1750}, 'slow');</code></p></li>
  </ol>
  
  <p>Should I be using <code>requestAnimationFrame</code>?</p>
  
  <p><a href="http://paulirish.com/2011/requestanimationframe-for-smart-animating/">http://paulirish.com/2011/requestanimationframe-for-smart-animating/</a></p>
  
  <p>Are there any examples that trigger an animation once on click and not continuous renders?</p>