Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/467.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 当sidr离开画布菜单激活时,如何禁用滚动文档?_Javascript - Fatal编程技术网

Javascript 当sidr离开画布菜单激活时,如何禁用滚动文档?

Javascript 当sidr离开画布菜单激活时,如何禁用滚动文档?,javascript,Javascript,我在我的项目中使用sidr离开画布菜单(只是我自己的项目。我开发它只是为了了解更多关于网站的信息)。我的意思是使内容或主体标记在非画布激活时不滚动,但它不工作。我尝试添加属性“溢出:隐藏;”。但什么都不管用 你能告诉我怎么做吗?你能添加一个你正在使用的代码示例吗。谢谢window.onscroll=wind document.getElementById('off-canvas').onclick=function myfunction(){window.onscroll=function(){

我在我的项目中使用sidr离开画布菜单(只是我自己的项目。我开发它只是为了了解更多关于网站的信息)。我的意思是使内容或主体标记在非画布激活时不滚动,但它不工作。我尝试添加属性
“溢出:隐藏;”。但什么都不管用


你能告诉我怎么做吗?

你能添加一个你正在使用的代码示例吗。谢谢window.onscroll=wind document.getElementById('off-canvas').onclick=function myfunction(){window.onscroll=function(){window.scrollTo(0,0);};}$(document.ready(function(){$('#off canvas').sidr();});