What I want to do, is to catch the event when the user is scrolling div horizontally.
For vertical scroll I am using event ‘mousewheel’ and it’s working properly. ( horizontal scroll is performed by a two finger drag on the touchpad – I am testing on Mac OS).
What I want to do, is to catch the event when the user is
Share
You can handle horizontal scrolling by :
In this case this bind all kind of scroll events on this element so you can also handle
Vertical by
e.currentTarget.scrollTopand
Horizontal by
e.currentTarget.scrollLeft