views:

24

answers:

1

Hi, my website is powered by wordpress and I have conflicting plugins.

I found when I remove the

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"&gt;&lt;/script&gt; 

from the header to load the Jquery libary, the plugin works but all other Jquery elements do not.

I thought a good solution would be to make a condition where Jquery does not load on the page where I am running the plugin to stop the conflict but I am not sure if this is possible or how to achieve this.

Any help on the matter would be appriciated.

Thanks.

+2  A: 

Just add jQuery.noConflict(); after adding jquery.min.js just like that:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"&gt;&lt;/script&gt; 
<script type="text/javascript">jQuery.noConflict();</script>

From this point you will need to use jQuery() instead of $(), but it will be conflict free.

Māris Kiseļovs
Hi, thanks so much- thats solved it. I had tried adding <script type="text/javascript">jQuery.noConflict();</script>but hadn't realised i needed to replace $()Thanks!
nofxteacake