forked from madrobby/scriptaculous
-
Notifications
You must be signed in to change notification settings - Fork 0
Sortable
hAmpzter edited this page Sep 12, 2010
·
18 revisions
Behaviours > Sortable
A Sortable is a quick way to initialize many Draggable elements in a container element. When you create a new Sortable, it takes care of the creation of the corresponding Draggables Droppables.
Use Sortable.create('id_of_container',[options]);
to create new Sortables. See Sortables.create.
_Property/Method | Description |
SERIALIZE_RULE |
|
sortables | (Object) { } |
options (element) | Internal function |
destroy (element) | Destroys sortable |
create (element, options) | Creates sortable |
findElements (element, options) | Internal function |
onHover (element, dropon, overlap) | Internal function, which may be overridden through the options parameter on creation |
onEmptyHover (element, dropon, overlap) | Internal function |
unmark() | Internal function |
mark() | Internal function |
tree (element) | |
sequence (element) | |
setSequence (element, new_sequence) | |
serialize (element) |
See Sortable Lists Demo, Ghostly Sortable Demo and Sortable Floats Demo.
See Sortable.create.
Sortable.destroy( element );
A call to Sortable.create
implicitly calls Sortable.destroy
if the referenced element was already a Sortable.
Function | Description |
Sortable.serialize | The Sortable object also provides a function to serialize the Sortable in a format suitable for HTTP GET or POST requests. This can be used to submit the order of the Sortable via an Ajax call. See Sortable.serialize |
Sortable.sequence | The Sortable object also provides a function to get the values in an sequence array object. See Sortable.sequence |
A short tutorial on using Sortables prepared for the Linux Users Group, Villafranca, Italy.