The question is so long that coming up with a title that summarises it proved tricky.
So anyway. I have a div
that has overflow: auto
and t
While the accepted answer definitely will get you the result you need, there is a noticeable difference in the smoothness of scrolling naturally and the scrolling triggered by setting scrollTop.
This utilizes the best parts of pointer-events: none;
without actually removing the ability to interact with your fixed elements.
function enableScroll(e) {
var self = $(this);
self.css('pointer-events', 'none');
clearTimeout(this.timer);
this.timer = setTimeout(function () {
self.css('pointer-events', 'all');
}, 100);
}
$('#fixed').on('mousewheel DOMMouseScroll', enableScroll);