Search code examples
jqueryfirefoxmagentomagento-1.5

Has anybody had this problem - jquery not working with Magento in Firefox?


I'm running Magento 1.5.1.0 and have included a jquery image fader on the home page, running on my testing server. It works perfectly in Ie and chrome but does not work in Firefox.

If i enable Template Path Hints it will run the script ok turn it of and it does'nt run.

I'm getting no errors in firebug or firefox.

I have this code in the 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>

And i have this at the top of my page.xml file:

<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>

I have also cleared the cache in Magento and firefox.

Has anybody got any ideas ??

Many thanks in advance.


Solution

  • You're loading three versions of 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.
    • and an unknown version: jquery.js.

    You should only load one and that should probably be a version more recent than 1.4.2. Try just loading the most recent (1.6.4) from Google's CDN:

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