jQuery UI



index
Disabled back button Next Section
printable version

Section 1: Introduction

jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library. Whether you're building highly interactive web applications or you just need to add a date picker to a form control, jQuery UI is the perfect choice.

from jQuery User Interface

jQuery UI is a powerful JavaScript library built on top of jQuery JavaScript library. UI stands for User Interface. It is a set of plug-ins for jQuery that adds new functionalities to the jQuery core library.

from jQuery UI - Overview


Features

jQuery UI is categorized into four groups:

The structure of the library is as shown in the image below:

jQuery UI Categories.

Benefits of jQuery UI


Summary


Linking

Visit jQuery CDN – Latest Stable Versions and scroll down to the jQuery UI section.

If you click on the uncompressed or minified link, the result is a recommendation to link jQuery to your page using the following code:

<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"
integrity="sha256-VazP97ZCwtekAsvgPBSUwPFKdrwD3unUfSGVYrahUqU="
crossorigin="anonymous">
</script>

The integrity and crossorigin attributes are used for Subresource Integrity (SRI) checking. This allows browsers to ensure that resources hosted on third-party servers have not been tampered with. Use of SRI is recommended as a best-practice, whenever libraries are loaded from a third-party source. Read more at srihash.org.

The web page must include a link to both jQuery and jQuery UI.

Be sure to include the link to jQuery before the link to jQuery UI!

Section 2: Categories

The previous image indicated that jQuery UI is categorized into four groups, interactions, widgets, effects, utilities.

jQuery UI Categories.

Interactions

jQuery interactions provide mouse-based interactivity that lets visitors move or alter elements on a page.

jQuery UI Interactions.

Widgets

A widget is an element of interaction in a graphical user interface, such as a button or a date picker.

jQuery UI Widgets. jQuery UI Widgets.

Effects

Effects include changes in color, motion, form, or spatial position (referred to as preattentive visual properties) to enhance visual appeal.

jQuery UI effects fall into three groups: classes, actions, and options

jQuery UI Effects.

This diagram is similar to the one above, but includes descriptions in the lower tier.

jQuery UI Effects Tree.
Section 3: Interactions

Interactions include


Draggable

Allows an element to be dragged about the page.

jQuery UI Draggable. jQuery UI Draggable.

Draggable Demo


Droppable

A draggable element can be dropped in a droppable element.

jQuery UI Droppable. jQuery UI Droppable.

What to do when dropped:

jQuer yUI Droppable.

Droppable Demo

Another Droppable Demo


Resizable

Allows an element to have draggable resizing handles.

jQuery UI Resizable. jQuery UI Resizable.

Works on all kinds of elements:

jQuery UI Resizable.

In order to get the following demo to work, the following link had to be included in the <head> section:

<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">

Resizable Demo

Another Resizable Demo


Selectable

Allows a list of element to be "selectable".

jQuery UI Selectable. jQuery UI Selectable.

Selectable Demo

Another Selectable Demo


Styling for Selectable

You can set the style while being selected and after being selected using .ui-selecting and .ui-selected respectively.

jQuery UI Styling. jQuery UI Styling.

jQuery UI Basic Selectable

For more details on styling, visit any of the following:


Sortable

Allows a list of elements to be rearranged in the DOM.

jQueryUI Sortable. jQueryUI Sortable.

Sortable Demo

Another Sortable Demo

Section 4: Widgets

Widgets are user interface elements, and include the following:


Accordion

Creates a sliding accordion.

jQueryUI Accordion.

Requires: [Header : Content] pair model

jQuery UI Accordion.

Accordion Demo

Another Accordion Demo


Both of the following approaches work:

jQueryUI Accordion.

AutoComplete

jQuery UI AutoComplete.

AutoComplete Demo

Another AutoComplete Demo


Checkboxradio

Radio Button

jQuery UI Checkboxradio.

Recall that a radio group is defined by giving each of the radio buttons in the group the same name.

In the demo below, each radio button was assigned the same name to prevent multiple selections.

Checkboxradio Demo

Another Checkboxradio Demo

One more Checkboxradio Demo


Checkbox

jQueryUI Checkboxradio.

Checkboxradio Demo

Another Checkboxradio Demo


Datepicker

jQuery UI Datepicker.

Datepicker Demo


Dialog

jQuery UI Dialog.

Dialog Demo


Menu

jQuery UI Menu.

Menu Demo

Another Menu Demo

" target="_blank">Menu Demo

Note that the menu cannot be 100% wide or the submenus will not display.


Progressbar

jQuery UI Progressbar.

Progressbar Demo


Select Menu

jQuery UI Select Menu.

Selectmenu Demo


Slider

jQuery UI Slider.

Slider Demo


Spinner

jQuery UI Spinner.

Spinner Demo


Tabs

jQuery UI Tabs.

Tabs Demo


Tooltip

jQuery UI Tooltip.

Tooltip Demo

Section 5: Themes

Pick from existing themes (Gallery)

jQuery UI Themes.

Themes can be customized.

jQuery UI Themes.

Read more about themes at