Loading jQuery Library: Link to the latest version of the jQuery library stored on an online Content Delivery Network (CDN) server.
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:
http://code.jquery.com/jquery-latest.min.js.
<!-- Link to jQuery library stored on a CDN server. -->
<script src="http://code.jquery.com/jquery-latest.min.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 loaded the latest version successfully from an online source!');
}
});
</script>