0

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?

1 Answer 1

4

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

Sign up to request clarification or add additional context in comments.

2 Comments

wow one comma messed me up for like 3 hours !!! thanks, searched all over site and came over this fix but i must have missed that comma when trying to fix. thanks again !
@cookney this has happened to me in the past - its the first thing i check - note there are some good JavaScript Validators on line - this is one -> jslint.com P.S. Don't forget to accept an answer :-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.