Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/91.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 禁用在Div中滚动_Javascript_Html_Css - Fatal编程技术网

Javascript 禁用在Div中滚动

Javascript 禁用在Div中滚动,javascript,html,css,Javascript,Html,Css,我的网站底部有一个旋转木马滑块。现在,当我滚动到该滑块时,该滑块向左和向右移动。我想禁用它。知道如何禁用此功能的人吗 如果需要禁用滚动,您应该可以将其添加到CSS中: overflow-x: hidden; /* Horizontally */ overflow-y: hidden; /* Vertically */ overflow: hidden; /* Both ways */ 如果需要禁用滚动,您应该能够将其添加到CSS中: overflow-x: hidden; /* Hor

我的网站底部有一个旋转木马滑块。现在,当我滚动到该滑块时,该滑块向左和向右移动。我想禁用它。知道如何禁用此功能的人吗


如果需要禁用滚动,您应该可以将其添加到CSS中:

 overflow-x: hidden; /* Horizontally */
 overflow-y: hidden; /* Vertically */
 overflow: hidden; /* Both ways */

如果需要禁用滚动,您应该能够将其添加到CSS中:

 overflow-x: hidden; /* Horizontally */
 overflow-y: hidden; /* Vertically */
 overflow: hidden; /* Both ways */

打开文件jquery.contencaruel.js并注释掉(或删除)代码的以下部分:

// adds events to the mouse
                    $el.bind('mousewheel.contentcarousel', function(e, delta) {
                        if(delta > 0) {
                            if( cache.isAnimating ) return false;
                            cache.isAnimating   = true;
                            aux.navigate( -1, $el, $wrapper, settings, cache );
                        }   
                        else {
                            if( cache.isAnimating ) return false;
                            cache.isAnimating   = true;
                            aux.navigate( 1, $el, $wrapper, settings, cache );
                        }   
                        return false;
                    });

这部分代码将鼠标滚动与旋转木马中的幻灯片更改绑定在一起。

打开文件jquery.contencarousel.js并注释(或删除)以下部分代码:

// adds events to the mouse
                    $el.bind('mousewheel.contentcarousel', function(e, delta) {
                        if(delta > 0) {
                            if( cache.isAnimating ) return false;
                            cache.isAnimating   = true;
                            aux.navigate( -1, $el, $wrapper, settings, cache );
                        }   
                        else {
                            if( cache.isAnimating ) return false;
                            cache.isAnimating   = true;
                            aux.navigate( 1, $el, $wrapper, settings, cache );
                        }   
                        return false;
                    });

这部分代码将鼠标滚动与旋转木马中的幻灯片更改绑定。

在jquery.mousewheel.js>中注释类型事件“mousewheel”


在jquery.mouseweel.js>中,注释类型事件“mouseweel”