I am including JQuery in my site and referencing to external scripts that will utilize the Jquery afterwards. However, I don’t think they are running as Jquery, they are just failing… My HTML looks like this:
<script type="text/javascript" src="lib/jquery/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="lib/load.js"></script>
<script type="text/javascript" src="lib/logErr.js"></script>
In the head section.
load.js contains this:
$(‘body’).css(‘background-color’,’black’);
but does not work.
When I switched it to state: alert(‘Hey’); using simple Javascript, it did work. All files do work. Please any suggestions?
1st option Just have an alert in DOM ready Event
2nd Option is to hit the F12 in the browser and check for the jQuery file in the scripts section. If jQuery is loaded properly then you can see the script file in there..
EDIT
Looks to me like a file reference error..
Why not use jQuery hosted by Google CDN
Include this in your header section instead of the jQuery file you are using