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

Categorizing the component categories


There are three types of component found within the jQuery UI library, as follows:

  • Low-level interaction helpers: These components are designed to work primarily with mouse events

  • Widgets: These components produces visible objects on the page

  • Core components: These are the components that the other parts of the library rely on

Let us take a moment to consider the components that make up each of these categories, beginning with the core components.

The core components consist of:

  • Core

  • Widget

  • Mouse

  • Position

The core file sets up the construct that all components use to function, and adds some core functionality that is shared by all of the library components, such as keyboard mappings, parent-scrolling, and a z-index manager. This file isn't designed to be used on its own, and exposes no functionality that can be used outside of another component.

The interaction helpers are comprised of the following components:

  • Draggable

  • Droppable

  • Resizable

  • Selectable

  • Sortable

The interaction helpers add basic mouse-based behaviors to any element; this allows you to create sortable lists, resize elements (such as dialog boxes) on the fly or even build functionality (such as a drag-and-drop based shopping cart).

The higher-level widgets (at the time of writing) include:

  • Accordion

  • Autocomplete

  • Button

  • Datepicker

  • Dialog

  • Menu

  • Progressbar

  • Slider

  • Tabs

  • Menu

  • Tooltips

The widgets are UI controls that bring the richness of desktop application functionality to the Web. Each of the widgets can be fully customized, appearance and their behavior.

Introducing the widget factory and effects

When working with jQuery UI's widgets, you will come across the widget factory. This literally creates the basis for all of the visible widgets exposed by the library. It implements the shared API common to all widgets, such as create and destroy methods, and provides the event callback logic. It also allows us to create custom jQuery UI widgets that inherit the shared API. We will cover the Widget Factory in detail later on in this chapter.

Apart from these components and interaction helpers, there are also a series of UI effects that produce different animations or transitions on targeted elements on the page. These are excellent for adding flair and style to our pages. We'll be looking at these effects in the final chapter of this book, Chapter 14, UI Effects.

The great thing about jQuery UI's simplified API is that once you have learned to use all of the existing components (as this book will show you), you'll be able to pick up any new components very quickly. There are plans for many more components in future versions, including a move to merge jQuery Mobile into the library!