本文介绍了当鼠标光标位于div内时,使用jquery禁用鼠标滚轮功能吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用jquery禁用当鼠标指向div时滚动长页面的鼠标滚轮功能?

How to use jquery to disable mouse scroll wheel function that scrolling the long page when the mouse is pointing inside a div?

我需要禁用它,因为我在div内还有另一个鼠标滚轮功能,如果页面太长,当我在div内滚动鼠标滚轮时,div和页面都将被滚动.我不想都滚动它们,我只想在div内部滚动.

I need to disable it because I have another mouse scroll wheel function inside the div, if the page is too long, when i scroll my mouse wheel inside the div, the div and the page both will be scrolled. I don't want both of them be scrolled, i want inside div be scrolled only.

推荐答案

问题解决了,我只更改了body和div的CSS,它就可以了!快乐的.大声笑.

problem is solved, i just changed the css of body and div and it works!! Happy. LOL.

这篇关于当鼠标光标位于div内时,使用jquery禁用鼠标滚轮功能吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-31 01:44