Loading jQuery Library: Link and load the jQuery library from a local folder in the site structure and check it loads.
This checking script isn't the sort of thing you would put in a real site. It's just here so we can scheck that the linked jQuery library in this example loaded successfully.
jQuery failed to load
Notes:
<!-- Link to jQuery library stored locally. -->
<script src="js/jquery-1.10.2.js" type="text/javascript"></script>
<!-- Script to test if jQuery library loaded and set the text of a paragraph element named #message -->
<script>
$(document).ready(function(){
if (jQuery) {
// Change #message text to success message if jQuery loads
$("#message").text('jQuery 1.10.2 loaded successfully from a folder in this site structure!');
}
});
</script>