View Full Version : Multiple jQuery Libraries?

07-18-2011, 06:25 AM
I'm trying to get the plugin GTranslate to work on my site. I can get the default Google Translate setting to work but when trying the jQuery setting it does nothing.

I've been lead to believe that the reason for this is that something else on the page is using another jQuery library causes the clash. I know the social media rotator in Socrates also uses jQuery so am wonder how to get them both to use the same library? Is such a thing possible? Or do the plugin author and Socrates team need to have a discussion?

Dan Nickerson
07-18-2011, 11:28 AM
If your plugin inserts a jquery, then remove our javascript call from header.php and see if it resolves.

07-18-2011, 12:02 PM
Thanks once again for your rapid response! I commented it out with

#<?php wp_enqueue_script( 'comment-reply' ); ?>
#<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
#<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/scripts/myStuff.js"></script>
#<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/scripts/supersleight.plugin.js"></script>
#<script type="text/javascript">
#var J = jQuery.noConflict();
#J(document).ready(function() {J('body').supersleight();});
Did I do that right? Reason I ask is that the error is still there. The rotation of banner ads and the social network contacts still work. Still no working translations.

Dan Nickerson
07-18-2011, 08:20 PM
No, just remove pound signs and do this.

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

07-19-2011, 09:27 AM
Does it then matter where that is placed? (edit scratch that - after going into the code again I saw exactly what you meant. It now works like a dream. Thank you!! Much appreciated.)