Name | Type | Default |
---|---|---|
appendTo | String | 'parent' |
Sets or gets where will be appended the draggable's feedback. Code examples
Set the
Get the
Try it: appendTo is set to 'body'
|
||
disabled | Boolean | false |
Sets or gets whether the dragging is disabled. Code examples
Set the
Get the
Try it: disabled is set to true
|
||
distance | Number | 5 |
Sets or gets the distance required for the cursor to pass befor the drag begins. Code examples
Set the
Get the
Try it: distance is set to 10
|
||
data | Object | null |
This property can be used for setting some kind of information transferred with the draggable. Code examples
Set the
Get the
|
||
dropAction | String | 'default' |
Sets or gets whether the draggable element will change its position ('default') or not ('none') when the element is dropped. Code examples
Set the
Get the
Try it: dropAction is set to 'none'
|
||
dropTarget | String/Object | null. |
Sets or gets the drop target. The drop target is a DOM element(s) for which jqxDragDrop triggers events when the user drags or drops the draggable element over that element(s). The drop target can be specified by using a selector or an object. If the user drags the draggable element over the drop target, the onDropTargetEnter event will be raised. If the draggable element is inside the drop target and the user drags the element outside the drop target, the onDropTargetLeave event is raised. When the user drops the draggable element over a drop target, the onTargetDrop event is raised. Code examples
Set the
Specifying the drop target with CSS selector:
The above code will make all elements which use the "dropTarget" CSS class to be drop targets for the draggable element.
Get the
|
||
dragZIndex | Number | 99999 |
Sets or gets element's z-index when it's dragging. Code examples
Set the
Get the
Try it: dragZIndex is set to 6
|
||
feedback | String | 'clone' |
Sets or gets the feedback. The feedback is the object which is actually dragged by the user. Possible Values:
Code examples
Set the
Get the
Try it: feedback is set to 'original'
|
||
initFeedback | Function | null |
Callback which is executing when the feedback is created. Code examples
Set the
Get the
|
||
opacity | Number | 0.6 |
Sets or gets draggable object's opacity when it's dragging. Code examples
Set the
Get the
Try it: opacity is set to 0.3
|
||
onDragEnd | Function | null |
Callback which is executing when the drag ends. Code examples
Set the
Get the
|
||
onDrag | Function | null |
Callback which is executing while dragging. Code examples
Set the
Get the
Try it: onDrag is set to custom function
|
||
onDragStart | Function | null |
Callback which is executing when drag start. Code examples
Set the
Get the
|
||
onTargetDrop | Function | null |
Callback which is executing when drag ends over the drop target. Code examples
Set the
Get the
|
||
onDropTargetEnter | Function | null |
Callback which is executing when the draggable enter any of it's drop targets. Code examples
Set the
Get the
|
||
onDropTargetLeave | Function | null |
Callback which is executing when the draggable leave any of it's drop targets. Code examples
Set the
Get the
|
||
restricter | Object/String | 'document' |
Sets or gets dragdrop's restrict area. Possible Values:
Code examples
Set the
Get the
Try it: restricter is set to 'parent'
|
||
revert | Boolean | false |
Sets or gets whether the draggable element will be reverted to it's original position after drop. Code examples
Set the
Get the
Try it: revert is set to true
|
||
revertDuration | Number | 400 |
Sets or gets the duration for which the draggable object will be reverted. Code examples
Set the
Get the
Try it: revertDuration is set to 300
|
||
tolerance | String | 'intersect' |
Sets or gets whether the draggable item is over it's drop target when it's intersecting it or when it's fully inside it's target. The onDropTargetEnter event will be triggered depending on the value of this property. The 'fit' tolerance means that the draggable item is fully inside the target, where the 'intersect' means that the item is intersecting with the target.Code examples
Set the
Get the
Try it: tolerance is set to 'fit'
|
||
Events |
||
dragStart | Event | |
This event is triggered when the item is dragged for first time. Code examples
Bind to the
|
||
dragEnd | Event | |
This event is triggered when the item is dropped. Code examples
Bind to the
|
||
dragging | Event | |
This event is triggered while the item is dragging. Code examples
Bind to the
|
||
dropTargetEnter | Event | |
This event is triggered when the draggable item is over it's drop target for first time. Code examples
Bind to the
|
||
dropTargetLeave | Event | |
This event is triggered when the draggable item leave it's drop target. Code examples
Bind to the
|