What is jQuery UI

The jQuery library has received considerable attention in this book, and deservedly so. After all, not only does jQuery come packaged with Drupal, but much of Drupal's own JavaScript code uses jQuery.

The small jQuery library doesn't provide widgets or other components popular in JavaScript libraries. Instead, it is focuses on providing a rich toolset for working with the DOM, CSS, events, and AJAX.

Interested in calendar widgets, or tabs, or sliders, or drag-and-drop support? You won't find any of those in jQuery. But you will find them in an official jQuery add-on package called the jQuery UI. The jQuery UI library provides a huge repository of tools for building rich user interfaces. It builds on the solid foundation of jQuery, but it adds much more.

I _The official jQuery UI web site is co-located with the jQuery home page

I Visit http://ui.jquery.com to learn more about the project and to

I view some of the demos.

Here's a partial list of the things you will find in jQuery UI:

• Drag-and-drop support: Declare elements as draggable or configure them as dropable containers.

• Over a dozen additional effects (in addition to slide and fade): Some, like explode, are tantalizingly elaborate.

• Make elements or containers resizable: you can even add drag bars to images, allowing your users to click and drag on an image border to make the image larger.

• Sortable lists: Turn a list or group of items into a sortable list with drag-and-drop support.

There are even more features, but these should whet your appetite In this project, we will use the accordion tool to turn our menus into an elaborate expanding and collapsing accordion widget.

But the best part about this library is that, like jQuery, the tools are compact. Much can be done with only a few lines of code.

Was this article helpful?

0 0

Post a comment