简体   繁体   English

某些对象不支持jScrollPane? 没有自定义CSS应用于滚动条

[英]jScrollPane not supported by certain objects? No custom css applied to scrollbars

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. 很抱歉,如果这是一个非常简单的问题,但是我似乎无法在SO或jScroll google组中找到答案。

Currently, my code is essentially: 目前,我的代码本质上是:

<div id="wrapper">
    Content here.
</div>

Then, inside of a function called in $(document).ready, I have: 然后,在$(document).ready中调用的函数内部,我有:

$('#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. 有趣的是,代码成功将本地化的滚动条应用于包装器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. 但是,自定义css均未应用,并且当我检入Firebug时,jScroll没有创建它自己的滚动条,我怀疑这就是为什么只显示浏览器的本机滚动条设计的原因。

Any idea what this error means? 知道这个错误是什么意思吗? The object is a div, so I don't know why it won't support jScrollPane. 该对象是一个div,所以我不知道为什么它不支持jScrollPane。 All of the correct CSS and JS files are being pointed to, and Firebug tells me that the site is loading them. 指向所有正确的CSS和JS文件,Firebug告诉我该站点正在加载它们。 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. 我不确定这是否正是问题得以解决的原因,但是我意识到我正在处理的页面的其他部分正在调用jQuery的更新版本。 I removed all of the calls, except for the one shown above, since it's the version called on the jScrollPane tutorial page. 我删除了所有调用,但上面显示的调用除外,因为它是jScrollPane教程页面上调用的版本。 Seemed to fix the problem. 似乎可以解决问题。

Thanks everyone. 感谢大家。

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. 我不确定这是否正是问题得以解决的原因,但是我意识到我正在处理的页面的其他部分正在调用jQuery的更新版本。 I removed all of the calls, except for the one shown above, since it's the version called on the jScrollPane tutorial page. 我删除了所有调用,但上面显示的调用除外,因为它是jScrollPane教程页面上调用的版本。 Seemed to fix the problem. 似乎可以解决问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM