title: Make "scrollLeft" / "scrollTop" changes not trigger scroll event listener
body: <p>Currently my program is in a spot where it both listens for the user to scroll a certain element, but also, at times, automatically scrolls this element by itself. (Not a gradual, pretty scroll, but an instant jump. It makes sense in context, I swear.)</p>
  
  <p>Is there a way to make the scroll event not trigger if the scrolling was done by setting scrollLeft or scrollTop? My first thought was a basic switch, like:</p>
  
  <pre><code>ignoreScrollEvents = true;
  element.scrollLeft = x;
  ignoreScrollEvents = false;
  
  function onScroll() {
    if(ignoreScrollEvents) return false;
  }
  </code></pre>
  
  <p>but since events don't trigger immediately (oops, duhh), that's not a workable solution. What other sort of answers could I try? I'm also using jQuery, if that helps anything.</p>