我想將一些外部JavaScript文件添加到magento cms,但不知何故,它們似乎無法工作,雖然它們在頭部顯示正常。將外部javascript文件添加到magento頭文件
我添加的代碼以下行head.phtml
<!--pankaj js edition-->
<script src="<?php echo $this->getJsUrl(); ?>jQuery_1205141001.js" type="text/javascript"></script>
<script src="<?php echo $this->getJsUrl(); ?>Common_1205141001.js" type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js" type="text/javascript"></script>
它們顯示在頁面呈現頭部,但似乎並沒有做的工作,他們都應該做這件事。
上午,我做錯了什麼。因爲這些文件在簡單的html頁面中運行良好。我是否需要將文件添加到別的地方。抱歉打擾,但我是一個magento新手。
也許'jquery.min.js'需要加載_before_其他兩個? –
@JürgenThelen,絕對正確 –