Javascript Magento中遇到未捕获的TypeError

Javascript Magento中遇到未捕获的TypeError,javascript,jquery,css,magento,Javascript,Jquery,Css,Magento,我正在尝试让jQuery与我的Magento一起工作。我已经添加了jquery和FoundationJS和CSS的链接。但当我尝试加载jquery时,未捕获类型错误: Uncaught TypeError: Object #<HTMLDocument> has no method 'foundation' 我确实为jquery添加了NoConflict,这就是为什么我不明白为什么它不应该工作 我的头部代码在page.xml中: <reference name="head"&g

我正在尝试让jQuery与我的Magento一起工作。我已经添加了jquery和FoundationJS和CSS的链接。但当我尝试加载jquery时,未捕获类型错误:

Uncaught TypeError: Object #<HTMLDocument> has no method 'foundation'
我确实为jquery添加了NoConflict,这就是为什么我不明白为什么它不应该工作

我的头部代码在page.xml中:

<reference name="head">
   <action method="addJs"><script>foundation/modernizr.js</script></action>
   <action method="addJs"><script>foundation/jquery.js</script></action>
   <action method="addJs"><script type="text/javascript">
        // <![CDATA[
            // noConflict so we can use both libraries
                $.noConflict(); 
            // your current code here 
            //]]>
    </script></action>
   <action method="addJs"><script>foundation/foundation.min.js</script></action>
                 <action method="addCss"><stylesheet>css/foundation.css</stylesheet></action>
                <action method="addCss"><stylesheet>css/style.css</stylesheet></action>
                <action method="addCss"><stylesheet>css/flexslider.css</stylesheet></action>
                <action method="addCss"><stylesheet>css/main.css</stylesheet></action>  
 </reference>
在my header.phtml中,我在html部分之后添加了以下代码:

<script>
$.noConflict();
$(document).foundation();
</script>

<script type="text/javascript">
    $(window).load(function(){
    $('.flexslider').flexslider({
        animation: "fade",
        controlNav: true,    
        directionNav: false,
        slideshowSpeed: 5000,  
        animationSpeed: 900,  
        start: function(slider){
    $('body').removeClass('loading');
            }
        }); 
    });
</script>

有什么问题吗?

jQuery=jQuery.noConflict。。使用jQuery变量而不是$$,只要使用jQuery而不是原型.jQuyDeopr.Trime.Fund;我可以用它来调用基础吗?我尝试了它,它似乎已经修复了jQuery问题,但是它找不到基础。js,即使它已经被嵌入到标签中。