title: jquery - Add class based on vertical scroll
body: <p>I have a single page portfolio site and would like to add a class to each nav element when the user scrolls to that section on the page. </p>
  
  <p><a href="http://www.legworkstudio.com/" rel="nofollow">http://www.legworkstudio.com/</a> uses this function on their site but I can't find the jQuery snippet for reference. </p>
  
  <p>Can anyone help with this?</p>