title: Mouse Wheel Event and Scroll Event conflicting with eachother
body: <p>My Problem is this:</p>
  
  <p>I have a MouseWheel Event (from plugin: <a href="https://github.com/brandonaaron/jquery-mousewheel" rel="nofollow">https://github.com/brandonaaron/jquery-mousewheel</a>) that triggers a function:</p>
  
  <pre><code>$(document).on('mousewheel', onMouseWheel);
  
  function onMouseWheel(event,delta)
  { Code... }
  </code></pre>
  
  <p>I Also have a Scroll Event that triggers another function:</p>
  
  <pre><code>$(document).on('scroll', onScroll);
  
  function onScroll()
  { Code... }
  </code></pre>
  
  <p>However when using the mouswheel, both events are triggered and so both functions run, which I don't want them to. They have to be separate since using the mousewheel and dragging the scrollbar should give separate results. The problem only occurs that way around ie. the mousewheel function is not triggered by dragging the scrollbar.</p>
  
  <p>EDIT:</p>
  
  <p>I've realized with a little help, that the problem occurs because I use ScrollLeft() inside my mousewheel function, which of course causes the scroll event.</p>
  
  <p>I've tried to think of a solution but with no luck. Can anyone help? Thanks!   </p>
  
  <p>EDIT: More code:</p>
  
  <pre><code>$(document).on('scroll', onScroll );
  
              function onScroll()
              {
                  code...
              }
  
  
              $(document).on('mousewheel', onMouseWheel ) );
  
              function onMouseWheel(event,delta)
              {
                  event.preventDefault(); 
  
                  if(delta&lt;0)
                  {       
                      detectDown();       
                  }
  
                  else if(delta&gt;0)
                  {
                      detectUp();
                  }
  
                  return false;   
              }
  
  
              $(document).on("keydown", onKeyDown);
  
              function onKeyDown(e)
              {
                  event.preventDefault();
  
                  if (e.keyCode == 37) 
                  { 
                      detectUp();
                  }
                  else if (e.keyCode == 39)
                  {
                      detectDown();   
                  }
  
              }
  
  
              function detectUp()
              {
                  $("html, body").animate({scrollLeft:(currentElement.prev().position().left - 100)}, 800, 'easeOutQuad'); 
                  currentElement = currentElement.prev();
              }
  
              function detectDown()
              {
                  $("html, body").animate({scrollLeft:(currentElement.next().position().left - 100)}, 800, 'easeOutQuad'); 
  
              }
  </code></pre>
  
  <p>Maybe this helps?</p>