magento使用jquery
安装key:
Mxperts - jQuery Base
Extension Key:magento-community/Mxperts_Jquery
网址: http://www.magentocommerce.com/extension/1619/mxperts--jquery-base
安装后,使用的不是$,而是JQuery,例子
将下面的代码粘贴到content里面就可以!!
<script type="text/javascript">// <![CDATA[
jQuery(document).ready(function(){
jQuery("button").click(function(){
jQuery("p").hide();
});
});
// ]]></script>
<h2>This is a heading</h2>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
<p><button>Click me</button></p>