Book Image

jQuery UI 1.10: The User Interface Library for jQuery - Fourth Edition

Book Image

jQuery UI 1.10: The User Interface Library for jQuery - Fourth Edition

Overview of this book

jQuery UI, the official UI widget library for jQuery, gives you a solid platform on which to build rich and engaging interfaces quickly, with maximum compatibility, stability, and effort. jQuery UI's ready-made widgets help to reduce the amount of code that you need to write to take a project from conception to completion. jQuery UI 1.10: The User Interface Library for jQuery has been specially revised for Version 1.10 of jQuery UI. It is written to maximize your experience with the library by breaking down each component and walking you through examples that progressively build up your knowledge, taking you from beginner to advanced user in a series of easy-to-follow steps. Throughout the book, you'll learn how to create a basic implementation of each component, then customize and configure the components to tailor them to your application. Each chapter will also show you the custom events fired by the components covered and how these events can be intercepted and acted upon to bring out the best of the library. We will then go on to cover the use of visually engaging, highly configurable user interface widgets. At the end of this book, we'll look at the functioning of all of the UI effects available in the jQuery UI library.
Table of Contents (22 chapters)
jQuery UI 1.10: The User Interface Library for jQuery
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Downloading the library


This book is specifically tailored towards Version 1.10 of jQuery UI and requires jQuery 1.6 or higher; throughout this book, we will be using jQuery 2.0.3 in our code samples.

Note

If you still need to support IE6 then the legacy Version 1.9.2 of the jQuery UI library is also available for download. You will also need to avail yourself of a copy of jQuery 1.10, as jQuery 2.0 does not support IE 6-8.

To obtain a copy of the library, we should visit the Download Builder at http://www.jqueryui.com/download. This tool gives us a range of different options for building a download package that is tailored to our particular requirements. The following screenshot shows the Download Builder:

We can either download the complete current release or a complete package of a legacy version. We can also select just the components that we want and download a custom package—this is particularly recommended for production environments, where we are only using a subset of the UI library; this helps to reduce bandwidth used when viewing the page.

The page is laid out in a friendly and easy-to-use way. It lists all of the different components in their respective groupings (UI Core, Interactions, and Widgets) and allows us to choose from one of the 24 different predesigned themes (or no theme at all). The page also provides information about the package (including both its compressed and uncompressed size).

Tip

If as a developer you would like to see the latest snapshot of jQuery UI under source control, then you can download a copy from GitHub, which is available at https://github.com/jquery/jquery-ui.

We'll look at the different files found within the library in just a moment, but for now we should download the complete library. It will contain everything we need, including the JavaScript and CSS files, as well as any images from the current theme that rely on different components. It even contains the latest version of jQuery itself, so we don't need to worry about downloading this separately.

For now, just use the custom Download link at the top of the page then select Smoothness as the theme on the following page, and then click on Download. We'll look at downloading and using other themes in the next chapter.

The code download that accompanies this book includes a copy of jQuery 2.03 within each chapter's exercise folder. If you need to download a new copy, you can do so—the instructions for downloading a new copy are listed in Appendix, Help and Support.

Using the hosted versions of jQuery UI

We don't need to download the library in order to implement it in a production web application. Both jQuery and jQuery UI are hosted on content delivery networks (CDN) provided by Google, CDNJS, Microsoft, and MediaTemple (who provide the CDN for the jQuery UI).

On a live site that receives a lot of international traffic, using a CDN will help ensure that the library files are downloaded to a visitor's computer from a server that is geographically close to them. This helps in making the response quicker for them and saving our own bandwidth. This is not recommended for local development however!

Tip

Hosted Files

If you would like to take advantage of using the CDN links, then these can be found at the following locations: