Appendix L. Selectables

Method

Description

Return Value

Sortable Methods

selectable(options)

Turns the children of selected element(s) into selectable elements. Options can be specified by passing an object literal as the first argument using key, value pairs. For a complete list of options, see the "Selectable Options" section later in this Appendix.

jQuery

selectable('disable')

Disables selectable functionality on the selected element(s).

jQuery

selectable('enable')

Enables selectable functionality on the selected element(s).

jQuery

selectable('refresh')

Refreshes the position and size of each selected element.

jQuery

selectable('toggle')

Toggles selectability (between enabled and disabled).

jQuery

selectable('destroy')

Completely removes the selectable functionality.

jQuery

Selectable Options

Option

Description

Type

autoRefresh

This option determines whether to refresh (the cached) the position and size of each selectable element at the beginning of a select operation. If you have experienced performance degradation (as you would if you have lots of selectable elements), you might want to set this option to false and refresh positions manually, as needed. The default value is true.

Boolean

filter

The matching child elements will be made into selectable elements. The default value is * (all children elements).

Selector

selected

This function is executed at the end of a select operation (when the mouse button has been released), on each element added to the selection. Selected elements are available in the ui ...

Get Beginning JavaScript® and CSS Development with jQuery now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.