Q sortable Class
This jQuery plugin adds a behavior to a container that allows the user to sort its children via drag-and-drop in various environments.
Constructor
Q sortable
-
[options]
Parameters:
-
[options]
Object optionaloptions object which conatins parameters for function
-
[draggable='*']
String optionalSelector for elements that can be dragged
-
[droppable='*']
String optionalSelector for elements that can act as drop targets
-
[zIndex=999999]
Number optionalCSS z-index for sortable elements
-
[draggedOpacity=0.8]
Number optionalElement Drag effect opacity
-
[placeholderOpacity=0.1]
Number optionalOpacity for elements placeholder
-
[lift]
Object optionalparameters object for vertical movement
-
[delay=300]
Number optionalmovement delay in milliseconds -
[delayTouchscreen=300]
Number optionalmovement delay for touchscreens in milliseconds -
[threshhold=10]
Number optionalStart moving elemnt after threshhold pixels mouse (touch) dragging -
[zoom=1.1]
Number optionalZoom element on dragging -
[animate=100]
Number optionalAnimation speed in milliseconds
-
-
[scroll]
Object optionalparameters object for horisontal movement and scroll dragging
-
[delay=300]
Number optionalmovement delay in milliseconds -
[delayTouchscreen=300]
Number optionalmovement delay for touchscreens in milliseconds -
[threshhold=10]
Number optionalStart moving elemnt after threshhold pixels mouse (touch) dragging -
[distance=1.5]
Number optionalScrolling distance -
[distanceWindow=0.1]
Number optionaldistance to block corner -
[speed=30]
Number optionalElement horizontal movement , scrolling speed -
[acceleration=0.1]
Number optionalMovement Step value
-
-
[drop]
Object optionalobject for dropping effect options
-
[duration]
Number optionalDuration of dropping effect
-
-
[onLift]
Q.Event optionalThis triggers when an item was lifted up for dragging
-
[onIndicate]
Q.Event optionalThis triggers whenever a drop result is indicated
-
[beforeDrop]
Q.Event optionalThis triggers right before a drop
-
[onDrop]
Q.Event optionalThis triggers after a drop. You can override the default handler the tool attaches.
-
[requireDropTarget]
Boolean optionalWhether to prevent dropping on something that is not a drop target (not in options.droppable)
-
[onSuccess]
Q.Event optionalThis event triggers after a successful drag and drop
-
Item Index
Methods
Methods
invalidate
-
errors
Display errors on some fields
Parameters:
-
errors
Objectcontains {fieldName: errorHTML} pairs
reset
-
elements
Reset all the fields, clearing any errors
Parameters:
-
elements
HTMLElement | Array | JQueryAny elements for which to clear errors. Defaults to all elements for which the validator added errors.