I have a website that runs on WordPress. The site uses several JavaScript components. Most notably the slides on the homepage, the schedule, and the contact form. All of the features work as expected in Chrome, Firefox, and other good browsers, but not in IE.
All of these features break due to problems that show up in the JavaScript. I have included several samples of what is happening below:
Error in IE Debug Console: “SCRIPT1006: Expected: ‘)’ – modernizr.foundation.js?ver=3.4.2, line 4 character 94”
m.join(a";")(b||"")
Actual file on the server:
m.join(a+";")(b||"")
Error in IE Debug Console: “SCRIPT1006: Expected: ‘)’ – jquery.js?ver=1.7.2, line 2 character 148”
d=f("<"">")
Actual file on the server:
d=f("<"+a+">")
They all follow this pattern of missing characters (most often ‘+’ signs). I am completely flummoxed as to what would cause this problem in Internet Explorer and would be relieved to know what’s going on, and how to fix it.
It’s to do with the way you’re serving .js files. In particular your modernizr, you are bringing in as follows:
(by the way, you have many JS and CSS files, it would be better if you could combine them, also your load order is a bit suspect, but that’s not the main problem)
If you simply access the URL:
http://rowbotfitness.com/wp-content/themes/businesspro/core/library/js/foundation/modernizr.foundation.js
…in Firefox, then look at the error that pops up in your Firebug console, you’ll see the error that is causing you grief in IE:
Not sure what is generating that JS file for you (with the ?ver=3.4.2) but you’d be better off linking straight to a JS file, and then setting up the correct MIME type in your webserver software. See here for a discussion on StackOverflow about that:
Javascript MIME Type