jQuery conflict issues between jScrollPane and NivoSlider WP plugin

Go To StackoverFlow.com

1

I'm having a conflict issue with jScrollPane and the NivoSlider WP plugin. Prior to installing NivoSlider, jScrollPane was working fine. After installing it I'm getting the following error:

$('.scrollpane').jScrollPane is not a function

I've tried every combination of jQuery.noConflict that I know of and that is listed in the documentation.

I've also tried all of the recommendations found here: jScrollPane Scrollbar Problem

That includes using the WPScrollPane plugin which does not seem to work although it does stop the error from occurring.

Here are the pastebins with the conflicting JS:

2012-04-05 17:28
by Valjas
It is often easier to solve the problem by replicating it in JSFiddle: jsfiddle.ne - jeffery_the_wind 2012-04-05 17:32


1

I tracked down the problem causing this issue. The NivoSlider WP plugin was including an additional version of jQuery through the wp_footer() hook in Wordpress. To fix the issue I went into the plugin files and edited nivoslider4wp-show.php.

In my Wordpress install:

{wordpress directory}/wp-content/plugins/nivo-slider-for-wordpress/nivoslider4wp-show.php

And on line #32 I deleted:

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>

Issue resolved!

2012-04-11 19:44
by Valjas
Ads