jQuery / Javacript: Check if number is greater than another number by a minimum amount
<p>I have a function that fires only if a user has scrolled left or right, by doing the following: </p>

<pre><code>var currentScrollLeft = visibleArea.scrollLeft();

visibleArea.scroll(function () {
    var newScrollLeft = visibleArea.scrollLeft();

    if (newScrollLeft &gt; currentScrollLeft) {
        // do something
    }
});
</code></pre>

<p>But this fires after even the slightest change in <code>scrollLeft</code>. Is there a way I can tell it to only fire if it's moved more than a certain amount, say <code>50</code>?</p>
