I am working on a UI that uses horizontal scrolling in a div
element (using overflow: scroll
). I cannot scroll to the left, because it would start the
I also used jQuery mousewheel, attaching this callback:
onMousewheel: function(e, delta, deltaX, deltaY){
e.preventDefault();
$('leftElement').scrollLeft($('leftElement').scrollLeft() + deltaX); // leftElement = container element I want to scroll left without going back/forward
$('downElement').scrollTop($('downElement').scrollTop() - deltaY); // this was another element within the container element
}