I have a function that fires only if a user has scrolled left or right, by doing the following:
var currentScrollLeft = visibleArea.scrollLeft();
visibleArea.scroll(function () {
var newScrollLeft = visibleArea.scrollLeft();
if (newScrollLeft > currentScrollLeft) {
// do something
}
});
But this fires after even the slightest change in scrollLeft
. Is there a way I can tell it to only fire if it's moved more than a certain amount, say 50
?