title: stopping mousewheel event from happening twice in OSX
body: <p>I noticed mousewheel event is happening multiple times in mac osx. Can be atributed to inertia feature.</p>
  
  <p>Is there a way to fix this behaviour?</p>
  
  <p>(self signed ssl no worries please!)
  <a href="https://sandbox.idev.ge/roomshotel/html5_v2/" rel="nofollow noreferrer">https://sandbox.idev.ge/roomshotel/html5_v2/</a></p>
  
  <p>I'm using scrollSections.js <a href="https://github.com/guins/jQuery.scrollSections" rel="nofollow noreferrer">https://github.com/guins/jQuery.scrollSections</a></p>
  
  <p>And it uses mousewheel jquery plugin: <a href="https://github.com/brandonaaron/jquery-mousewheel" rel="nofollow noreferrer">https://github.com/brandonaaron/jquery-mousewheel</a></p>
  
  <p>I'm seeing a lot of people having the same issue: <a href="https://github.com/brandonaaron/jquery-mousewheel/issues/36" rel="nofollow noreferrer">https://github.com/brandonaaron/jquery-mousewheel/issues/36</a></p>
  
  <p>There are some solutions but none works with scrollSections plugin.</p>
  
  <p>Any ideas how to disable this inertia feature from JS?</p>
  
  <p>My attempted fix:</p>
  
  <pre><code>// Fix for OSX inertia problem, jumping sections issue.
  if (isMac) {
  
    var fireEvent;
    var newDelta = deltaY;
  
    if (oldDelta != null) {
  
      //check to see if they differ directions
      if (oldDelta &lt; 0 &amp;&amp; newDelta &gt; 0) {
        fireEvent = true;
      }
  
      //check to see if they differ directions
      if (oldDelta &gt; 0 &amp;&amp; newDelta &lt; 0) {
        fireEvent = true;
      }
  
      //check to see if they are the same direction
      if (oldDelta &gt; 0 &amp;&amp; newDelta &gt; 0) {
  
        //check to see if the new is higher
        if (oldDelta &lt; newDelta) {
          fireEvent = true;
        } else {
          fireEvent = false;
        }
      }
  
      //check to see if they are the same direction
      if (oldDelta &lt; 0 &amp;&amp; newDelta &lt; 0) {
  
        //check to see if the new is lower
        if (oldDelta &gt; newDelta) {
          fireEvent = true;
        } else {
          fireEvent = false;
        }
      }
  
    } else {
  
      fireEvent = true;
  
    }
  
    oldDelta = newDelta;
  
  } else {
  
    fireEvent = true;
  
  }
  </code></pre>
  
  <p>You can see fix implemented here: <a href="https://sandbox.idev.ge/roomshotel/html5_v2/" rel="nofollow noreferrer">https://sandbox.idev.ge/roomshotel/html5_v2/</a> But it is a hit/miss.</p>