title: Detect Intentional Top and Bottom extra scroll
body: <p>I'm trying to detect with javascript an intentional extra top/bottom scroll. <code>$(window).scrollTop()</code> and <code>window.pageYOffset</code> are not useful since they stop at <strong>Top 0</strong> and I would like to reach something like <strong>top -X</strong>. For bottom let's suppose my document's height is 500, bottom would be like <strong>bottom 5XX</strong>.</p>
  
  <p><strong>EDIT:</strong>
  An example code could be:</p>
  
  <pre><code>$(window).scroll(function(){
  
    if(intentionalScrollTop){
      // Do something
    }else if(intentionalScrollDown){
      // Do something
    }
  
  });
  </code></pre>
  
  <p>Gif example:
  <a href="https://i.stack.imgur.com/4L6h3.gif"><img src="https://i.stack.imgur.com/4L6h3.gif" alt="enter image description here"></a></p>