title: How to get a MouseWheel Event to fire only once in jQuery?
body: <p>So I want to fire a function only once every time a user scrolls up or down via the Mousewheel. See: <a href="http://jsfiddle.net/y4eUF/2/" rel="noreferrer">jsFiddle Demo</a>. The issue is that even though I have the e.preventDefault(), the function still fires multiple times. </p>
  
  <p>The goal is for the function to fire only once whenever a user scrolls up or down. Similar to this <a href="http://www.thepetedesign.com/demos/onepage_scroll_demo.html" rel="noreferrer">site</a>.</p>
  
  <p>Here is the code that I have so far:</p>
  
  <pre><code>var sq = {};
  sq = document;
  if (sq.addEventListener) {
      sq.addEventListener("mousewheel", MouseWheelHandler(), false);
      sq.addEventListener("DOMMouseScroll", MouseWheelHandler(), false);
  } else {
      sq.attachEvent("onmousewheel", MouseWheelHandler());
  }
  
  function MouseWheelHandler() {
      return function (e) {
          var e = window.event || e;
          var delta = Math.max(-1, Math.min(1, (e.wheelDelta || -e.detail)));
          if (delta &lt; 0) {
              /* Scroll Down */
              e.preventDefault();
              console.log("Down. I want this to happen only once");
  
          } else {
              /* Scroll Up */
              console.log("up. I want this to happen only once");
              e.preventDefault();
          }
          return false;
      }
      return false;
  }
  </code></pre>