Book Image

jQuery UI 1.8: The User Interface Library for jQuery

By : Dan Wellman
Book Image

jQuery UI 1.8: The User Interface Library for jQuery

By: Dan Wellman

Overview of this book

<p>jQuery UI, the official suite of plugins for the jQuery JavaScript library, gives you a solid platform on which to build rich and engaging interfaces with maximum compatibility, stability, and a minimum of time and effort.</p> <p>jQuery UI has a series of ready-made user interface widgets and a comprehensive set of core interaction helpers to reduce the amount of code that you need to write to take a project from conception to completion.<br /><br />jQuery UI 1.8: The User Interface Library for jQuery has been specially revised for version 1.8 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 upon your knowledge, taking you from beginner to advanced usage in a series of easy-to-follow steps.<br /><br />Throughout the book, you'll learn how each component can be initialized in a basic default implementation and then customize and configure each component to tailor it to your application. You'll look at the configuration options and the methods exposed by each component's API to see how these can be used to bring out the best of the library. Each chapter will also show you the custom events fired by the component covered and how these events can be intercepted and acted upon.</p>
Table of Contents (21 chapters)
jQuery UI 1.8 The User Interface Library for jQuery
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Downloading the library


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

We can either download the complete current release of the library (version 1.8.9 at the time of writing), or a complete package of a legacy version. We can also select just the components that we want and download a custom package.

Note

This book is specifically tailored towards version 1.8, which is above of jQuery UI and requires jQuery 1.3.2 or higher. To support older versions of jQuery, the legacy version 1.7.3 is also available from the download builder.

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

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 different components rely on. 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 Stable link at the top of the page. This will give us the default theme, which is called smoothness . We'll look at downloading and using other themes in the next chapter.

Tip

Hosted Files

We don't even need to download the library in order to implement it in a production web application. Both jQuery and jQuery UI are hosted on Google and Microsoft's Content Delivery Networks (CDN), so we can include <script> elements that link to these files instead of using local versions. Only the complete library (not individual components) is available, although there are a range of different releases.

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.

Google's CDN can be found at: http://code.google.com/apis/libraries/.

Microsoft's CDN can be found at: http://www.asp.net/ajaxlibrary/cdn.ashx.