|
Name |
Type |
appendTo
|
string
|
Defines where the helper that moves with the mouse is being appended to during the drag (for example, to resolve overlap/zIndex issues).
|
axis
|
object
|
If defined, the items can be dragged only horizontally or vertically.
Possible Values:
'x'
'y'
|
cancel
|
string
|
Prevents sorting if you start on elements matching the selector.
|
connectWith
|
object
|
A selector of other sortable elements that the items from this list should be connected to.
|
containment
|
object
|
Defines a bounding box that the sortable items are constrained to while dragging.
Code example
Set the containment property.
$('#jqxSortable').jqxSortable({containment : '.sortable-container'});
Get the containment property.
var containment = $('#jqxSortable').jqxSortable('containment');
|
cursor
|
string
|
Defines the cursor that is being shown while sorting.
|
cursorAt
|
object
|
Moves the sorting element or helper so the cursor always appears to drag from the same position. Coordinates can be given as a hash using a combination of one or two keys: { top, left, right, bottom }.
|
delay
|
double
|
Time in milliseconds to define when the sorting should start. Adding a delay helps preventing unwanted drags when clicking on an element.
|
disabled
|
bool
|
Disables the widget if set to true.
Code example
Set the disabled property.
$('#jqxSortable').jqxSortable({disabled : true});
Get the disabled property.
var disabled = $('#jqxSortable').jqxSortable('disabled');
|
distance
|
double
|
Tolerance, in pixels, for when sorting should start. If specified, sorting will not start until after mouse is dragged beyond distance. Can be used to allow for clicks on elements within a handle.
|
dropOnEmpty
|
bool
|
If false, items from this sortable can't be dropped on an empty connect sortable.
Code example
Set the dropOnEmpty property.
$('#jqxSortable').jqxSortable({dropOnEmpty : false});
Get the dropOnEmpty property.
var dropOnEmpty = $('#jqxSortable').jqxSortable('dropOnEmpty');
|
forceHelperSize
|
bool
|
If true, forces the helper to have a size.
|
forcePlaceholderSize
|
bool
|
Sets or gets the displaying of the popover's arrow.
|
grid
|
double[]
|
Snaps the sorting element or helper to a grid, every x and y pixels.
|
handle
|
object
|
Restricts sort start click to the specified element.
|
helper
|
object
|
Allows for a helper element to be used for dragging display.
|
items
|
string
|
Specifies which items inside the element should be sortable.
|
opacity
|
object
|
Defines the opacity of the helper while sorting. From 0.01 to 1.
|
placeholderShow
|
object
|
A class name that gets applied to the otherwise white space.
|
revert
|
object
|
Whether the sortable items should revert to their new positions using a smooth animation.
|
scroll
|
bool
|
If set to true, the page scrolls when coming to an edge.
|
scrollSensitivity
|
double
|
Defines how near the mouse must be to an edge to start scrolling.
|
scrollSpeed
|
double
|
Allows for a helper element to be used for dragging display.
|
tolerance
|
object
|
Specifies which mode to use for testing whether the item being moved is hovering over another item.
|
zIndex
|
double
|
Allows for a helper element to be used for dragging display.
|
|
onActivate
|
Event
|
This event is triggered on drag start when are used connected lists.
|
onBeforeStop
|
Event
|
This event is triggered when sorting stops, but when the placeholder/helper is still available.
|
onChange
|
Event
|
This event is triggered when the DOM position of an item is changed.
|
onDeactivate
|
Event
|
This event is triggered when sorting was stopped, is propagated to all possible connected lists.
|
onOut
|
Event
|
This event is triggered when a sortable item is moved away from a sortable list.
|
onOver
|
Event
|
This event is triggered when a sortable item is moved into a sortable list.
|
onReceive
|
Event
|
This event is triggered when an item from a connected sortable list has been dropped into another list.
|
onRemove
|
Event
|
This event is triggered when a sortable item from the list has been dropped into another.
|
onSort
|
Event
|
This event is triggered during sorting.
|
onStart
|
Event
|
This event is triggered when sorting starts.
|
onStop
|
Event
|
This event is triggered when sorting has stopped.
|
onUpdate
|
Event
|
This event is triggered when the user stopped sorting and the DOM position has changed.
|
|
Name |
Arguments |
Return Type |
cancelMethod
|
()
|
void
|
Cancels a change in the current sortable and reverts it to the state prior to when the current sort was started.
|
destroy
|
()
|
void
|
Removes the sortable functionality.
|
disable
|
()
|
void
|
|
enable
|
()
|
void
|
|
refresh
|
()
|
void
|
|
refreshPositions
|
()
|
void
|
Refresh the cached positions of the sortable items.
|
serialize
|
(object obj)
|
string
|
Serializes the jqxSortable item ids into a form/ajax submittable string. Calling this method produces a hash that can be appended to any url to easily submit a new item order back to the server.
|
toArray
|
()
|
object[]
|
Serializes the jqxSortable item ids into an array of strings.
|