Friday, 3 February 2012

Jquery and Magento

OK, a quick one. Magento and Jquery can work together very well, but there's a couple of things you have to do.

1) Jquery, make sure you have the latest version

2) prototype.js (part of magento) has to also be the latest version [on magento 1.6 it's v1.7 of prototype which IS the latest version. woop.]

Once you have the latest Jquery (1.6 at time of writing I think?) - open the file, and add:
jQuery.noConflict();

right down at the bottom.

I believe that the order you call scripts may be important - so if you still have gripes, try to make sure the <script> tag for jquery is ABOVE the one for prototype.

No comments:

Post a Comment