Web Development with jQuery®

(Elliott) #1

bapp10.indd 02/17/2015 Page 551


Draggable and Droppable


DRAGGABLE AND DROPPABLE METHODS

METHOD DESCRIPTION RETURNS

draggable(options) Makes the selected element(s) draggable.
Options can be specifi ed by passing an object
literal as the fi rst argument using key, value
pairs. For a complete list of options, see
the “Draggable Options” table later in this
appendix.

jQuery

draggable('destroy') Completely removes draggable functionality
from the selected element(s).

jQuery

draggable('disable') Disables draggable functionality on the
selected element(s).

jQuery

draggable('enable') Enables draggable functionality on the
selected element(s).

jQuery

draggable('option') Returns an object literal containing key, value
pairs representing the value of each currently
set option.

Object

draggable('option',
option)

Returns the currently set value of the provided
option name.

Mixed

draggable('option',
option, value)

Sets the value of provided option to value. jQuery

draggable('widget') Returns a jQuery object containing the drag-
gable element.

jQuery

J


continues

http://www.it-ebooks.info

Free download pdf