HTML and CSS Reference
When the user clicks the element and starts dragging it,
the dragstart event is fired. As the element is dragged
over the target, the target fires several events, AS shown here.
As the dragged element enters the target, the
ondragenter event is fired, allowing you to
provide user feedback or set styles.
you to set
the drag object.
As the element is dragged over
the target, the ondragover
event is fired repeatedly.
Finally, when the user releases the mouse button over the
drop area, the ondrop event is fired, this is your opportunity
to read the data set in the ondragstart event and perform
in the DOM while
A common task for
the ondrop event
IS to remove the
from the DOM and
re - insert it as a
child of the target
Now that you have an overview, let's examine the details.