This should not at all be difficult but I can't get a simple JavaScript file included in a flat HTML page.
My JavaScript file is as follows:
<script>
$(document).ready(function() {
$('div').css('background', 'red');
});
</script>
HTML code is as follows:
<html>
<head>
<script src="js/jquery-1.11.1.min.js"></script>
<script src="js/init.js"></script>
</head>
<title>Song Index!</title>
<body>
<div>It's working!</div>
</body>
</html>
I have confirmed both javascript files are in my js folder.
However, on Chrome I keep getting this error:
Uncaught SyntaxError: Unexpected token < init.js:1
Firefox renders a slightly different error:
SyntaxError: syntax error <script> init.js (line 1)
I just don't get why it's not working.
<script></script>tags from the javascript file