HTML and CSS Reference
Starting with jQuery
In order to use jQuery you must include the jQuery library in the HTML page. This can be
achieved by serving your own copy of the jQuery library, or by utilizing a hosted version
from a content delivery network (CDN), most notably Google.
As a general rule, for production deployment you should favour CDN hosted op-
tions. These tend to provide superior performance for users than hosting your own
copy. For development I generally prefer to download my own copy, since this
removed the need for a network connection to run the application.
If you wish to use the Google hosted version of jQuery, simply include it in the head of the
In order to serve your own copy, download the latest version of jQuery from here:
The examples in this topic are using 2.0.3, but any recent version will be compatible.
non-minimalized form. The non-minimalized form is useful for debugging, but either ver-
sion will be appropriate. Once downloaded, save the file in a subdirectory of the main folder
(the one containing the HTML file) called scripts.
Your directory structure should now look like this:
Now add the following to the head section of the HTML file: