Using jQuery
Include jQuery in your pages

Part of a series providing exercises and additional material for readers of Sams Teach Yourself JavaScript in 24 Hours (5th Edition), this course introduces the popular jQuery library.

The jQuery library can be included in your web page either by using a local copy or a remote version (usually referred to as a Content Delivery Network or CDN). In these examples we'll use a CDN.

Various versions of the library are available, but to make sure you have the latest, simply include the following in your page's <head> secion:

<script src="http://code.jquery.com/jquery-latest.min.js"></script>

Enter the <script> tag to link to the CDN of jQuery, as shown above, then click Submit.

View Preview