I'm trying to disable the window mouse scroll functionality when the mouse is hovering over the div - so that only div scrolling is enabled - and when mouse moves away from the div - scrolling to the window is applied again. The div is positioned absolutely.
I've seen this post use jquery to disable mouse scroll wheel function when the mouse cursor is inside a div? but it doesn't seem to provide any answer - hence my question.
I'm assuming it would be something like this (if only these methods existed):
$('#container').hover(function() {
$(window).scroll().disable();
$(this).scroll().enable();
}, function() {
$(window).scroll().enable();
});