I have scrollable <div>( overflow: auto;) and I want to detect the event of dragging the scrollbar inside a div. My current code is:
var scrollableDiv = $('.scrollablediv');
$(document).on('DOMMouseScroll mousewheel touchmove scroll', scrollableDiv, function(e){
});
But this only works when using the mouse wheel. If I drag the scroll bar <div>generated by the browser when the content is full, the event will not be fired. What should I add for this?
source
share