2011-09-26 48 views
0

我正在運行Magento 1.5.1.0,並在我的測試服務器上運行的主頁上包含了一個jQuery圖像推子。它在Ie和Chrome中完美工作,但在Firefox中不起作用。有沒有人有這個問題 - jquery沒有在Firefox中使用Magento?

如果我啓用模板路徑提示,它將運行腳本確定關閉它,它不會運行。

我在firebug或firefox中沒有錯誤。

我在head.phtml

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/ 
1.3.2/jquery.min.js"></script> 
<script type="text/javascript"> 
//<![CDATA[ 
var $j = jQuery.noConflict(); 
$j(document).ready(function() { 
$j('#s3slider').s3Slider({ 
    timeOut: 4000 
}); 
}); 



//]]> 
</script> 

這個代碼,我有這個在我page.xml文件的頂部:

<action method="addJs"><script>jquery-1.4.2.min.js</script></action> 
<action method="addJs"><script>jquery.js</script></action> 
<action method="addJs"><script>prototype/prototype.js</script></action> 

我也清除高速緩存中的Magento和Firefox瀏覽器。

有沒有人有任何想法?

非常感謝提前。

+6

您正在加載jQuery(1.3.2,1.4.2和三個未知版本)的三個版本。首先加載一個jQuery。 –

+0

你還在加載s3Slider插件嗎? – voigtan

+0

謝謝你只用一個! – Ledgemonkey

回答

1

你加載的jQuery的三個版本:

  • 1.3.2:http://ajax.googleapis.com/ajax/libs/jquery/ 1.3.2/jquery.min.js
  • 1.4.2:jquery-1.4.2.min.js
  • 和未知版本:jquery.js

您應該只加載一個,應該可能是一個比1.4.2更新的版本。嘗試從Google的CDN中加載最近的(1.6.4):

http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js 
+0

對不起,延遲迴復!我已經完成了你的建議,現在正在完美地工作!非常感謝您的幫助... – Ledgemonkey