-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
ASP.NET jQuery Cookbook (Second Edition) - Second Edition
By :
This recipe explains how to download jQuery on your system along with the version/build to use and the supporting files that are required.
Following are the steps to download jQuery:


jQuery is available in two different major versions at the time of writing:
Though the Application Programming Interface (API) is the same for both major versions, the difference lies in the support offered for certain browsers. The 2.x line does not support old browsers, such as IE 6, 7, and 8, while the 1.x line continues with this support. So, if the end users of your application will not be using old browsers, you can download the 2.x version.
The jQuery library consists of a single JavaScript (.js) file and can be downloaded in the following formats:
To download the file, simply right-click on the required version, 1.x or 2.x, and the required format: uncompressed or compressed. Save the file in a location of your choice as shown in the following screenshot:

Note the following naming convention for the jQuery library:
|
Uncompressed |
Compressed | |
|---|---|---|
|
Version 1.x |
jquery-1.x.x.js |
jquery-1.x.x.min.js |
|
Version 2.x |
jquery-2.x.x.js |
jquery-2.x.x.min.js |
The compressed (minified) version is clearly distinct from the uncompressed version because of the .min.js extension. The minified file uses code optimization techniques, such as removing whitespaces and comments as well as reducing variable names to one character. This version is difficult to read, so the uncompressed version is preferred when debugging.
On the download page, there is also a map file available with the .min.map extension. Sometimes, when bugs appear in the production environment necessitating troubleshooting, the use of the minified file for debugging can be difficult. The map file simplifies this process. It maps the compressed file back to its unbuilt state so that during debugging, the experience becomes similar to using the uncompressed version.
The Understanding CDN for jQuery recipe.
Change the font size
Change margin width
Change background colour