I have a scrollable <div>
(overflow: auto;
) and I want to detect the event of dragging the scroll bar inside the div. My current code is:
var scrollableDiv = $('.scrollablediv');
$(document).on('DOMMouseScroll mousewheel touchmove scroll', scrollableDiv, function(e){
// do something
});
But it's only triggered when use the mouse wheel. If I drag the scrollbar of the <div>
generated by the browser when the content overflows, the event is not triggered. What should I add for it to work?