title: Jquery if scroll is a certain amount of pixels
body: <p>Is there a built in jQuery function to determine the length of a scroll?</p>
  
  <p>I'm trying to write a function that will add a class to a div if the user has scrolled 50 pixels from the top.</p>
  
  <p>So the code will look like this:</p>
  
  <pre><code>if(userHasScrolled) {
       $('#myDiv').addClass('hasScrolled');
  
  }
  </code></pre>