Week 1: Exercise 1 (local)

Installing jQuery: Download the jQuery library into a local folder in the site and link it to a HTML page.

jQuery failed to load

Notes:


See the code:

<!-- 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(){
$(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>