Hold to Drag
DragTarget enables you to apply a hold delay after an element is pressed, by setting the
dragDelay option. With this setup, dragging will be allowed only after the specified period of time has passed.
To indicate that the pre-defined drag delay is reached, the
DragTarget will emit a
onDragReady event before the
onDragStart event. It allows you to apply custom logic and styling before the drag is initiated by the user.
The following example demonstrates setting a delay of 500 milliseconds.