title: Detecting mousewheel on the x-axis (left and right) with Javascript
body: <p>I know it's possible to detect up and down e.g.</p>
  
  <pre><code>    function handle(delta) {
      if (delta &lt; 0) {
          alert('down');
  } else {
      alert('up');
      }
  }
  
  function wheel(event){
      var delta = 0;
      if (!event) event = window.event;
      if (event.wheelDelta) {
          delta = event.wheelDelta/120; 
      } else if (event.detail) {
          delta = -event.detail/3;
      }
      if (delta)
          handle(delta);
          if (event.preventDefault)
                  event.preventDefault();
          event.returnValue = false;
  }
  
  /* Initialization code. */
  if (window.addEventListener)
      window.addEventListener('DOMMouseScroll', wheel, false);
  window.onmousewheel = document.onmousewheel = wheel;​
  </code></pre>
  
  <p>But is there a way to detect if a user's mouse went left or right with the mousewheel?</p>