FoamyMedia
FoamyMedia

Reputation: 496

Issue with loading external Javascript file in IE7

I have an external javascript file called plugins.js which has all my jquery code for several plugins on the home page. They all work fine in all browsers expect ie7, which wont load any of them. ie7 will only load them if i include them separately in the head of the index.php page, but i dont want to do this as the plugins script is quiet long and this is why i wanted to load it separately.

Code can be seen on - www.cutecupcak.es

i cant seem to insert the code here sorry. But the external script file is called .plugins.js

How can i get ie7 to read these scripts without moving them all to the home page?

Upvotes: 0

Views: 387

Answers (1)

Manse
Manse

Reputation: 38147

Your problem is a , - change

$('#slider').nivoSlider({ //home page slider //
  animSpeed: 1500,
  pauseOnHover: true,
  pauseTime: 5500,
});

to

$('#slider').nivoSlider({ //home page slider //
  animSpeed: 1500,
  pauseOnHover: true,
  pauseTime: 5500 // Removed last comma
});

IE is extremely picky with extra trailing commas

NOTE: I found this error by looking at the Developer Tools within IE - it told me there was an error Expected identifier, string or number on Line 12 of plugin.js

Upvotes: 4

Related Questions