Web Development with jQuery®

(Elliott) #1

(^564) ❘ APPENDIX K SORTABLE
forcePlaceholderSize If true, this option forces the placeholder for
the sortable to have a size.
Default value: false
Boolean
grid Snaps the dragging element/helper to a grid,
every x and y pixels, where x and y are
specifi ed as an Array [x, y].
Default value: false
Array
handle Restricts sorting from starting unless it
begins on the specifi ed element.
Default value: false
Selector
Element
helper This option allows a helper element to be
displayed while dragging is taking place.
If a callback function is specifi ed, it should
return a valid DOM node that can be used
for display.
Default value: 'original'
Element
function
(event,
element)
items Which items sorting should be applied to.
Default value: '> *'
Selector
opacity Defi nes the opacity of the helper while
sorting using a CSS opacity value, where 0
is fully transparent, 1 is fully opaque, and
fl oating points between are semitransparent.
For example, 0.5 would be half-transparent
(or half-opaque).
Default value: 1
Float
placeholder Applies a class name to the placeholder
element (which would otherwise be empty
white space).
Default value: false
String,
Boolean
revert This option triggers the dragged item to be
reverted back to its original position using
a smooth animation. If the value provided is
true, a default animation is used. If a
number is provided, it represents the
duration in milliseconds.
Default value: true
Boolean,
Number
(continued)
http://www.it-ebooks.info

Free download pdf