Appendix L

Selectable

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('option') Returns an object containing key value pairs representing the current selection of options. Object
selectable(optionName) Returns the current value of the specified option. Mixed
selectable(optionName, value) Sets the value of the specified option. jQuery
selectable('disable') Disables selectable functionality on the selected element(s). jQuery
selectable('destroy') Completely removes the selectable functionality. 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('widget') Returns a jQuery object containing the selectable element. jQuery
Selectable Options
Option Description Type
appendTo This option determines what element the selection box will be appended to.Default selector: "body" Selector
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 a lot ...

Get Web 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.