How to use jquery functions in magento ( noConflict() method )

Posted by Labels: at

Magento is a very big system, so sometimes things might not work as you would expect. here is a little trick you need to use before using any jquery functions in your your js file. 

>> call the jQuery noConflict function:

var $juery = jQuery.noConflict();

Paste the above code in your .js file, Now instead of calling your jquery functions with the $ dollar sign, you now need to replace it with "$jquery".

>> here is a basic example:


$juery(document).ready(function() { ... });


If you feel like $jquery is too long, you can always choose your own variable like $j (my personal favourite).



Post a Comment

Back to Top