Appendix K

Sortable

Sortable Methods
Method Description Return Value
sortable(options) Makes the selected element(s) sortable. 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 “Sortable Options” section later in this appendix. jQuery
sortable('cancel') Cancels a change in the state of a sortable and reverts it back to what it was prior to sorting. jQuery
sortable('destroy') Completely removes sortable functionality from the selected element(s). jQuery
sortable('disable') Disables sortable functionality on the selected element(s). jQuery
sortable('enable') Enables sortable functionality on the selected element(s). jQuery
sortable('option', optionName) Returns the value of the specified option. Mixed
sortable('option') Returns an object containing all values of all options. Object
sortable('option', optionName, optionValue) Sets the specified option to the specified value. jQuery
sortable('option', object) Sets the specified options to the specified values by providing an object representing all of the options you'd like to set. jQuery
sortable('refresh') Refreshes the sortable items. jQuery
sortable('refreshPositions') Refreshes the cached positions of sortable items. jQuery
sortable('serialize', options) Returns a string of serialized IDs for each sortable item, which can then be used in an AJAX request or input form. For a complete list of options, see ...

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.