jScrollPane 不受某些对象支持?没有自定义 CSS 应用于滚动条
如果这是一个非常简单的问题,我很抱歉,但我似乎无法在 SO 或 jScroll 谷歌组中找到答案。
目前,我的代码本质上是:
<div id="wrapper">
Content here.
</div>
然后,在 $(document).ready 中调用的函数内部,我有:
$('#wrapper').jScrollPane({ showArrows: true, verticalArrowPositions: 'after'});
但是,我收到的错误是:
SCRIPT438: Object doesn't support property or method 'jScrollPane'
有趣的是,代码成功地将本地化滚动条应用于包装器 div。但是,没有应用任何自定义 CSS,并且当我检查 Firebug 时,jScroll 没有创建它自己的滚动条,我怀疑这就是为什么只显示浏览器的本机滚动条设计的原因。
知道这个错误意味着什么吗?该对象是一个div,所以我不知道为什么它不支持jScrollPane。所有正确的 CSS 和 JS 文件都被指向,Firebug 告诉我该网站正在加载它们。我在所有浏览器中都有同样的问题。
抱歉无法提供链接。该项目位于我公司的内部服务器上。感谢您提供的任何建议。
编辑:这是我的链接/脚本在标题中的样子。
<link type="text/css" href="jscroll/jScrollPane.css" rel="stylesheet" media="all" />
<script type="text/javascript" src="jscroll/jquery.mousewheel.js"></script>
<script type="text/javascript" src="jscroll/jScrollPane-min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
编辑:已解决。 我不确定这是否正是问题解决的原因,但我意识到我正在处理的页面的其他部分正在调用 jQuery 的更新版本。我删除了所有调用,除了上面显示的调用,因为它是 jScrollPane 教程页面上调用的版本。似乎解决了问题。
谢谢大家。
I'm sorry if this is a very simple question, but I can't seem to find the answer on SO or in the jScroll google group.
Currently, my code is essentially:
<div id="wrapper">
Content here.
</div>
Then, inside of a function called in $(document).ready, I have:
$('#wrapper').jScrollPane({ showArrows: true, verticalArrowPositions: 'after'});
However, the error I received is:
SCRIPT438: Object doesn't support property or method 'jScrollPane'
What's interesting, is that the code successfully applies localized scrollbars to the wrapper div. However, none of the custom css is applied, and when I check in Firebug, the jScroll is not creating it's own scrollbars, which I suspect is why only the browser's native scrollbar design shows up.
Any idea what this error means? The object is a div, so I don't know why it won't support jScrollPane. All of the correct CSS and JS files are being pointed to, and Firebug tells me that the site is loading them. I have the same issue in all browsers.
Apologies for not being able to provide a link. The project is on my company's internal servers. Thank you for any advice you might have.
EDIT: Here are what my links/script looks like in the header.
<link type="text/css" href="jscroll/jScrollPane.css" rel="stylesheet" media="all" />
<script type="text/javascript" src="jscroll/jquery.mousewheel.js"></script>
<script type="text/javascript" src="jscroll/jScrollPane-min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
EDIT: RESOLVED.
I'm not sure if this is exactly why the problem resolved, but I realized that other parts of the page I was working on were calling more updated versions of jQuery. I removed all of the calls, except for the one shown above, since it's the version called on the jScrollPane tutorial page. Seemed to fix the problem.
Thanks everyone.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
解决了。我不确定这是否正是问题解决的原因,但我意识到我正在处理的页面的其他部分正在调用 jQuery 的更新版本。我删除了所有调用,除了上面显示的调用,因为它是 jScrollPane 教程页面上调用的版本。似乎解决了问题。
RESOLVED. I'm not sure if this is exactly why the problem resolved, but I realized that other parts of the page I was working on were calling more updated versions of jQuery. I removed all of the calls, except for the one shown above, since it's the version called on the jScrollPane tutorial page. Seemed to fix the problem.