Re: [jscrollpane] Installing jscrollpane on WordPress- what am I doing wrong?

644 views
Skip to first unread message
Message has been deleted

Kelvin Luck

unread,
May 23, 2011, 6:11:39 AM5/23/11
to jscro...@googlegroups.com
Hi,

When I load your page I see a javascript error in the console:

"Uncaught TypeError: Object #<Object> has no method 'jScrollPane'"

Looking at the sourcecode I see that you load jQuery 1.4.2 just before
jScrollPane. You then load prototype. You then load jQuery 1.4.4.

A number of these things could be causing problems. If you are using
jQuery alongside another javascript library (e.g. prototype/
scriptalicious) then you need to use noConflict:

http://api.jquery.com/jQuery.noConflict/

As you can see, you should include prototype above jQuery and call
jQuery.noConflict()...

Including two versions of jQuery in the same page may also be causing
problems. You should also try to prevent this from happening.

Hope it helps,

Kelvin :)

On 22/05/2011 23:27, braaad wrote:
> Kelvin, I'd be happy to donate to the plug-in if you can help me ASAP.
> The website is here: http://bit.ly/jlnL4Q. I've searched all the other
> threads regarding jscrollpane + wordpress and have tried the
> following, but still no luck:
> + double-checked that all links to .js files in my head are correct
> + added the jscrollpane styles to my main stylesheet
> + replaced the $ with jQuery on document.ready
> + styled the .scroll-pane class with a height and overflow: auto
>
> Here's what I have in my head:
> [code]
> <!-- jScrollPane -->
> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/
> libs/jquery/1.4.2/jquery.min.js"></script>
> <script type="text/javascript" src="http://www.bradeller.com/sid/wp-
> content/themes/twentyten/js/jquery.jscrollpane.min.js"></script>
> <script type="text/javascript" src="http://www.bradeller.com/sid/wp-
> content/themes/twentyten/js/jquery.mousewheel.js"></script>
> <script type="text/javascript" src="http://www.bradeller.com/sid/wp-
> content/themes/twentyten/js/mwheelIntent.js"></script>
>
> <script type="text/javascript">
> jQuery(function()
> {
> jQuery('.scroll-pane').jScrollPane();
> jQuery('.scroll-pane').jScrollPane({showArrows:true});
> });
> </script>
> [code]
>

Message has been deleted

braaad

unread,
May 23, 2011, 6:41:15 PM5/23/11
to jscrollpane
Thanks for your help Kelvin but I found a WP plugin that made it a lot
easier. Putting it up here for everybody's future reference:
http://wordpress.org/extend/plugins/wp-jscrollpane.

Kelvin Luck

unread,
May 25, 2011, 9:25:39 AM5/25/11
to jscro...@googlegroups.com
Great - that looks like it will be useful for anyone who has trouble
with wordpress... Well found!

Cheers,

Kelvin :)

Reply all
Reply to author
Forward
0 new messages