1

I'm having a lot of troubles with JQuery libraries...

I'm fixing a client's website...

He has VM2 and Joomla 2.5. VirtueMart 2 uses JQuery 1.6; but the template of the website, which uses Helix framework, uses JQuery 1.8, even 1.7...

Is there anyway to make JQuery 1.6 and 1.8 co-exist?

If I enable JQuery 1.6 with JQuery Easy:

  • Coments tabs, Fancybox, Slider and Login pop-up won't work...

If I enable JQuery 1.7 / 1.8:

  • Products variants and 'add to cart' from Product details won't work...

So... what should I do?

You can check the website in the next link: http://www.benaventegrow.com/ I have enabled JQuery 1.6.4 with JQuery Easy

UPDATED

I have managed to make all the page works but product variants. I need to implement JQuery 1.6.4 for making it work...

1

It occurs to me that running two different versions of jQuery on the same site will give you a lot of headaches, and a lot of coding challenges unless you're a very experienced coder.

A quick Google search revealed that it might be possible to use jQuery 1.7 with VM:

If your template uses bootstrap.js then to solve a script error with VirtueMart's jQuery (version 1.6.4) you can replace that VM version with jQuery 1.7.1 - in com_virtuemart/assets/js/ the script is named jquery.min.js VirtueMart 2.0.x and fancybox will still work with that version.

You should try that solution first.

If it fails, there is a way to run multiple versions of jQuery:

<script type='text/javascript' src='path/to/jquery_1.8.js'></script>  
<script type='text/javascript'>  
 var $jq = jQuery.noConflict();  
</script>  
<script type='text/javascript' src='path/to/jquery_1.6.js'></script>

Now $jq belongs to jQuery 1.8, and $ to jQuery 1.6. Finally you have to go through your template code and change the jQuery code accordingly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.