开发者

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

开发者 https://www.devze.com 2023-03-25 04:40 出处:网络
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.

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, verticalArrowPosi开发者_开发技巧tions: '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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号