Saturday, April 14, 2012

jQuery conflict with prototype in Magento

Hi all,
I have got a good solution to prevent conflict jquery with prototype in magento
I have added the following code in page.xml after 
<action method="addJs"><script>mage/cookies.js</script></action>
this line and it's working fine.
 
<block type="core/text" name="google.cdn.jquery">
        <
action method="setText">
            <
text><![CDATA[<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
            
<script type="text/javascript">jQuery.noConflict();</script>]]>
            </
text>
        </
action>
    </
block>

2 comments: