Drag and Drop Algorithm
The basic Drag’n’Drop algorithm looks like this:
- Catch
mousedown
on a draggable element.
- Prepare the element to moving (maybe create a copy of it or whatever).
- Then on mousemove move it by changing
left
/top
and position:absolute
.
- On mouseup (button release) – perform all actions related to a finished Drag’n’Drop.
Here is an example -
Will be continued...