Clear Up
SharpKit Reference

SortableOptions Class

Options JSON object for Sortable

Namespace: SharpKit.jQuery

Base Types

System.Object

Constructors

Name Description
SortableOptions()

Properties

Name Description
activate This event is triggered when using connected lists, every connected list on drag start receives it.
appendTo Defines where the helper that moves with the mouse is being appended to during the drag (for example, to resolve overlap/zIndex issues). Default: 'parent'
axis If defined, the items can be dragged only horizontally or vertically. Possible values:'x', 'y'. Default: false
beforeStop This event is triggered when sorting stops, but when the placeholder/helper is still available.
cancel Prevents sorting if you start on elements matching the selector. Default: ':input,button'
change This event is triggered during sorting, but only when the DOM position has changed.
connectWith Takes a jQuery selector with items that also have sortables applied. If used, the sortable is now connected to the other one-way, so you can drag from this sortable to the other. Default: false
containment Constrains dragging to within the bounds of the specified element - can be a DOM element, 'parent', 'document', 'window', or a jQuery selector. Default: false Types: Element, String, Selector
create This event is triggered when sortable is created.
cursor Defines the cursor that is being shown while sorting. Default: 'auto'
cursorAt 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 }. Default: false
deactivate This event is triggered when sorting was stopped, is propagated to all possible connected lists.
delay Time in milliseconds to define when the sorting should start. It helps preventing unwanted drags when clicking on an element. Default: 0
disabled Disables (true) or enables (false) the droppable. Can be set when initialising (first creating) the droppable. Default:false
distance 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. Default: 1
dropOnEmpty If empty allows for an item to be dropped from a linked selectable. Default: true
forceHelperSize If true, forces the helper to have a size. Default: false
forcePlaceholderSize If true, forces the placeholder to have a size. Default: false
grid Snaps the sorting element or helper to a grid, every x and y pixels. Array values: [x, y] Default: false
handle Restricts sort start click to the specified element. Default: false Types: Selector, Element
helper Allows for a helper element to be used for dragging display. The supplied function receives the event and the element being sorted, and should return a DOMElement to be used as a custom proxy helper. Possible values: 'original', 'clone' Default: 'original' Types: String, Function
items Specifies which items inside the element should be sortable. Default: '> *'
opacity Defines the opacity of the helper while sorting. From 0.01 to 1 Default: false
out This event is triggered when a sortable item is moved away from a connected list
over This event is triggered when a sortable item is moved into a connected list.
placeholder Class that gets applied to the otherwise white space. Default: false
receive This event is triggered when a connected sortable list has received an item from another list.
remove This event is triggered when a sortable item has been dragged out from the list and into another.
revert If set to true, the item will be reverted to its new DOM position with a smooth animation. Default: false
scroll If set to true, the page scrolls when coming to an edge. Default: true
scrollSensitivity Defines how near the mouse must be to an edge to start scrolling. Default: 20
scrollSpeed The speed at which the window should scroll once the mouse pointer gets within the scrollSensitivity distance. Default: 20
sort This event is triggered during sorting.
start This event is triggered when sorting starts.
stop This event is triggered when sorting has stopped.
tolerance This is the way the reordering behaves during drag. Possible values: 'intersect', 'pointer'. In some setups, 'pointer' is more natural. intersect: draggable overlaps the droppable at least 50% pointer: mouse pointer overlaps the droppable Default: 'intersect'
update This event is triggered when the user stopped sorting and the DOM position has changed.
zIndex Z-index for element/helper while being sorted. Default: 1000
© Copyright 2005-2011 SharpKit. All rights reserved.