Downloading jQuery
Each chapter’s exercise folder in the code download will come with both versions of jQuery included—copies of Version 2.0.3 have been added to the JS
folder that comes as part of the normal download of jQuery (and which contains 1.9.1).
If you need to obtain fresh copies of Version 2.x of jQuery, you can do so by browsing to http://www.jquery.com/download. Here you will find links for both the uncompressed and compressed versions of jQuery 2.x. For the purposes of the exercises, I would recommend using the uncompressed version. You will need to right-click on the link, and choose
Save target as… (or your browser’s equivalent), in order to save the file into the JS
sub-folder.
Updating the code samples
All of the code samples are already set to use jQuery 2.0.3 by default. If we look at an example using the Tabs widget, we should see something like this, at the head of our example:
<!DOCTYPE html>
<html>
<head>
<meta charset=”utf-8”>
<title>Tabs</title>
<link rel=”stylesheet” href=”development-bundle/themes/base/jquery.ui.all.css”>
<script src=”js/jquery-2.0.3.js”></script>
<script src=”development-bundle/ui/jquery.ui.core.js”></script>
<script src=”development-bundle/ui/jquery.ui.widget.js”></script>
<script src=”development-bundle/ui/jquery.ui.tabs.js”></script>
...
Here the highlighted line is important to us; you will need to ensure that the file you have just downloaded has been saved with the filename of jquery-2.0.3.js
, in order for each sample to work correctly.