[英]Why does this nicescroll.js function only work in Chrome?
When I add some jQuery code to my website, it working in chrome but not in Firefox, IE, or Microsoft Edge. 当我在网站上添加一些jQuery代码时,它可以在chrome中运行,但不能在Firefox,IE或Microsoft Edge中运行。 When I try to rewrite the code again in a new project file from scratch, I found it works in all browsers.
当我尝试从头开始在新项目文件中再次重写代码时,我发现它可以在所有浏览器中使用。
The problem is with the nicescroll.js
file; 问题出在
nicescroll.js
文件上。 it works with Chrome and not in Firefox or other browsers, but I don't know the reason; 它适用于Chrome,不适用于Firefox或其他浏览器,但我不知道原因; I've used the file in other projects in the past without issue.
我过去在其他项目中都使用过该文件,没有任何问题。 Why wouldn't the below code work in Firefox or Edge?
为什么下面的代码在Firefox或Edge中不起作用?
$(document).ready(function() {
$("html").niceScroll({
cursorcolor:"#229ecf",
cursorwidth:"7px"
});
});
Please ensure you are using version: "3.7.6" of nice Scroll 请确保您使用的是尼斯滚动的版本:“ 3.7.6”
It works seamlessly with Mozilla Firefox and Google Chrome. 它与Mozilla Firefox和Google Chrome无缝兼容。
You can get the latest version here Nicescroll on Github 您可以在Github上的Nicescroll中获取最新版本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.