## Properties

Name | Type | Default
--- | --- | ---
restricter | Object/String | 'document'
Sets or gets dragdrop's restrict area. Possible values are 'body', 'document', 'parent', [top, left, width, height], { top: y, left: x, width: w, height: h } #### Code examples Initialize a jqxDragDrop with the `restricter` property specified.
    $('#jqxDragDrop').jqxDragDrop({restricter:'body'});
disabled | Boolean | false
Sets or gets whether the dragging is disabled. #### Code examples Initialize a jqxDragDrop with the `disabled` property specified.
    $('#jqxDragDrop').jqxDragDrop({disabled:true});
feedback | String | 'clone'
Gets or sets the feedback. The feedback is the object which is actually dragged by the user. Possible values are: 'clone', 'original'. When the value is 'original', the user drags the original element, otherwise the user drags a clone of the original element. #### Code examples Initialize a jqxDragDrop with the `feedback` property specified.
    $('#jqxDragDrop').jqxDragDrop({feedback:'original'});
opacity | Number | 0.6
Gets or sets draggable object's opacity when it's dragging. #### Code examples Initialize a jqxDragDrop with the `opacity` property specified.
    $('#jqxDragDrop').jqxDragDrop({opacity:0.3});
revert | Boolean | false
Gets or sets whether the draggable element will be reverted to it's original position after drop. #### Code examples Initialize a jqxDragDrop with the `revert` property specified.
    $('#jqxDragDrop').jqxDragDrop({revert:true});
revertDuration | Number | 400
Sets or gets the duration for which the draggable object will be reverted. #### Code examples Initialize a jqxDragDrop with the `revertDuration` property specified.
    $('#jqxDragDrop').jqxDragDrop({revertDuration:300});
distance | Number | 5
Gets or sets the distance required for the cursor to pass befor the drag begins. #### Code examples Initialize a jqxDragDrop with the `distance` property specified.
    $('#jqxDragDrop').jqxDragDrop({distance:10});
tolerance | String | 'intersect'. Possible values: 'intersect' and 'fit'.
Gets or sets 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 Initialize a jqxDragDrop with the `tolerance` property specified.
    $('#jqxDragDrop').jqxDragDrop({tolerance:'fit'});
data | Object | null
This property can be used for setting some kind of information transferred with the draggable. #### Code examples Initialize a jqxDragDrop with the `data` property specified.
    $('#jqxDragDrop').jqxDragDrop({data: {foo: 'foo', bar: 'bar'}});
dropAction | String | 'default'. Possible values: 'default' and 'none'.
Sets or gets whether the draggable element will change its position ('default') or not ('none') when the element is dropped. #### Code examples Initialize a jqxDragDrop with the `dropAction` property specified.
    $('#jqxDragDrop').jqxDragDrop({ dropAction: '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 Initialize a jqxDragDrop with the `dropTarget` property specified.
    $('#jqxDragDrop').jqxDragDrop( { dropTarget: $(document.body) } );
Specifying the drop target with CSS selector:
    $('#jqxDragDrop').jqxDragDrop( { dropTarget: $('.dropTarget') } );
The above code will make all elements which use the "dropTarget" CSS class to be drop targets for the draggable element.
dragZIndex | Number | 99999
Sets or gets element's z-index when it's dragging. #### Code examples Initialize a jqxDragDrop with the `dragZIndex` property specified.
    $('#jqxDragDrop').jqxDragDrop({ dragZIndex: 6 });
appendTo | String | 'parent'
Sets or gets where will be appended the draggable's feedback. #### Code examples Initialize a jqxDragDrop with the `appendTo` property specified.
    $('#jqxDragDrop').jqxDragDrop({ appendTo: 'body' });
onDragEnd | Function | null
Callback which is executing when the drag ends. #### Code examples Initialize a jqxDragDrop with the `onDragEnd` property specified.
    $('#jqxDragDrop').jqxDragDrop({ onDragEnd: function() { alert('Bar'); } });
onDrag | Function | null
Callback which is executing while dragging. #### Code examples Initialize a jqxDragDrop with the `onDrag` property specified.
    $('#jqxDragDrop').jqxDragDrop({ onDrag: function(data, pos) { alert(pos.x); } });
onDragStart | Function | null
Callback which is executing when drag start. #### Code examples Initialize a jqxDragDrop with the `onDragStart` property specified.
    $('#jqxDragDrop').jqxDragDrop({ onDragStart: function(pos) { alert(pos.x); } });
onTargetDrop | Function | null
Callback which is executing when drag ends over the drop target. #### Code examples Initialize a jqxDragDrop with the `onTargetDrop` property specified.
    $('#jqxDragDrop').jqxDragDrop({ onTargetDrop: function(data) { alert('Bar'); } });
onDropTargetEnter | Function | null
Callback which is executing when the draggable enter any of it's drop targets. #### Code examples Initialize a jqxDragDrop with the `onDropTargetEnter` property specified.
    $('#jqxDragDrop').jqxDragDrop({ onDropTargetEnter: function() { alert('Bar'); } });
onDropTargetLeave | Function | null
Callback which is executing when the draggable leave any of it's drop targets. #### Code examples Initialize a jqxDragDrop with the `onDropTargetLeave` property specified.
    $('#jqxDragDrop').jqxDragDrop({ onDropTargetLeave: function(data) { alert(data); } });
initFeedback | Function | null
Callback which is executing when the feedback is created. #### Code examples Initialize a jqxDragDrop with the `onDropTargetLeave` property specified.
    $('#jqxDragDrop').jqxDragDrop({ onDropTargetLeave: function(feedback) { feedback.width(300); } });
## Events
dragStart | Event |
The dragStart event is triggered when the item is dragged for first time. #### Code examples Bind to the dragStart event by type: jqxDragDrop.
    $('#jqxDragDrop').bind('dragStart', function () { // Some code here. });
dragEnd | Event |
The dragEnd event is triggered when the item is dropped. #### Code examples Bind to the dragEnd event by type: jqxDragDrop.
    $('#jqxDragDrop').bind('dragEnd', function () { // Some code here. });
dragging | Event |
The dragging event is triggered while the item is dragging. #### Code examples Bind to the dragging event by type: jqxDragDrop.
    $('#jqxDragDrop').bind('dragging', function () { // Some code here. });
dropTargetEnter | Event |
The dropTargetEnter event is triggered when the draggable item is over it's drop target for first time. #### Code examples Bind to the dropTargetEnter event by type: jqxDragDrop.
    $('#jqxDragDrop').bind('dropTargetEnter', function () { // Some code here. });
dropTargetLeave | Event |
The dropTargetLeave event is triggered when the draggable item leave it's drop target. #### Code examples Bind to the dropTargetEnter event by type: jqxDragDrop.
    $('#dropTargetLeave').bind('dropTargetLeave', function () { // Some code here. });