Chapter 8. jQuery UI widgets

 

This chapter covers

  • What jQuery UI widgets are
  • Using the jQuery UI widget framework
  • Applying the design principles
  • Creating a complete jQuery UI plugin

In the previous part of the book, you saw how to create a collection plugin by using a framework to manage basic interactions with jQuery. Now you’ll see how jQuery UI provides a similar framework to ensure that the collection of plugins that make up this package work in a standard manner.

jQuery UI “is a curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library” (http://jqueryui.com). It’s an official jQuery add-on that includes several UI components known as widgets. It uses the ThemeRoller tool (http://jqueryui.com/themeroller/) to generate a consistent look and feel for all the widgets that it manages.

8.1. The widget framework

8.2. Defining your widget

8.3. Attaching the plugin to an element

8.4. Handling plugin options

8.5. Adding event handlers

8.6. Adding methods

8.7. Removing the widget

8.8. Finishing touches

8.9. The complete plugin

8.10. Summary