我已经检查和测试了防止身体在div中滚动的各种功能,并组合了一个应该可以工作的功能。
$('.scrollable').mouseenter(function() {
$('body').bind('mousewheel DOMMouseScroll', function() {
return false;
});
$(this).bind('mousewheel DOMMouseScroll', function() {
return true;
});
});
$('.scrollable').mouseleave(function() {
$('body').bind('mousewheel DOMMouseScroll', function() {
return true;
});
});
时停用
有什么想法,或者更好的方法吗?
https://stackoverflow.com/questions/7600454
复制相似问题