I have a JavaScript file where no matter where I place it in the includes, the file below it is not being run (in both Chrome and Firefox – probably other browsers as well – just haven’t tested them). js files further down are still being run.
The lowest that I have been able to boil it down is:
var robots = {
init: function(height, width) {
}
};
And it also happens when I include an empty file. I have also had lines of code inside it as well.
There is a large number of javaScript files included in this page (18 (plus some inline) at this stage and more will come – aggregation and minification are on the list of todo’s (but won’t be happening in dev for obvious reasons)).
Any further ideas? I’ve inserted an empty javascript block in the html in the meantime and it works (but is a minor wtf).
Man I feel like an idiot.
I had included the javascript with the following syntax error (spot the missing >):
when it should have been: