Confused Using jquery lib with magento
I am working on magento.Magento uses prototype.js, i am in need of working jquery events so many situations i have to include some jquery,jquery.min and jquery-ui lib files for my work.
it always produce conflicts even for normal click events..
So How i can use jquery with magento, and Which lib file is best to work on magento? What i have to understand to use jquery with magento?
Please help me anyone, to understand the scenario...
You can use any js library, first of all you need to include yout library in the xml file from your theme, it depends on your theme witch xml you should use, upload the library to your js theme folder.
<action method="addItem"><type>skin_js</type><name>js/jquery.js</name></action>
Then in your jQuery add this snipped:
var $j = jQuery.noConflict();
Clear cache and try it.
You can try one last thing in your local.xml add this:
<default>
<reference name="head">
<block type="core/text" name="jquery.by.google">
<action method="setText">
<text><![CDATA[<script type="text/javascript" src="path/to/google/hosted/jquery"></script><script type="text/javascript">jQuery.noConflict();</script>]]>
</text>
</action>
</block>
</reference>
</default>