title: jQuery Tools Scrollable with Mousewheel - scroll ONE position and stop
body: <p>I am using bind/unbind for mousewheel scrolling, based on this SO response:</p>
  
  <p><a href="https://stackoverflow.com/questions/3338364/jquery-unbinding-mousewheel-event-then-rebinding-it-after-actions-are-complete">Jquery, unbinding mousewheel event, then rebinding it after actions are completed?</a></p>
  
  <p>I'm tunneling up the event tree from delta, to target only the X mousewheel values. All is working well. The problem I'm trying to overcome: I want to simply scroll forward/backward ONE panel, then stop scrolling. Currently, I'm unbinding the mousewheel event immediately after the move, and that effectively stops the scrolling...but unbinding the mousewheel event also jacks the page. What I need is to be able to sniff the very first deltaX value for direction, then make a move and stop listening. Do I need to look to autoscroll for answers? Binding/unbinding feels klugy, but I can't, for the life of me, figure how to kick out after one move, while still then being able to scroll after that move is complete. Here's my mousewheel function:</p>
  
  <pre><code>function mouseHandler(event, delta) {
  $('.homeScrollable').bind('mousewheel', mouseHandler);
  
  var deltaX = event.originalEvent.wheelDeltaX;
  //console.log(event.originalEvent.wheelDeltaX);
  
  if(deltaX &lt;= 0) {
      //move forward 1 screen and stop
      scrollapi.move(1);
      $('.homeScrollable').unbind('mousewheel', mouseHandler);
  } else if(deltaX &gt; 0) {
      //move backward 1 screen and stop
      scrollapi.move(-1);
      $('.homeScrollable').unbind('mousewheel', mouseHandler);
  }   
  event.preventDefault();
  
  // Rebind mousewheel event:
  $('.homeScrollable').bind('mousewheel', mouseHandler);     };
  </code></pre>
  
  <p>I've also looked at setting a timer, a la:</p>
  
  <p><a href="https://stackoverflow.com/questions/4596158/jquery-mousewheel-plugin-how-to-fire-only-one-function-every-scroll">jquery mousewheel plugin: how to fire only one function every scroll</a></p>
  
  <p>which seemed incredibly promising, but no-go. Here's the plugin page for this guy:
  <a href="http://brandonaaron.net/code/mousewheel/docs" rel="nofollow noreferrer">http://brandonaaron.net/code/mousewheel/docs</a></p>
  
  <p>Thanks for checking it out.</p>