Web APIsLesson 56Free preview
Drag and Drop API
This lesson is part of HTML · All levels
Summary
The Drag and Drop API allows the user to move elements by dragging and dropping them in a specific area. Activation begins with the draggable attribute on the element, then events such as dragstart, dragover, and drop set the flow. This feature is useful for sorted lists or file upload areas.
Key points
- Attribute draggable="true" makes the element draggable
- Event dragstart, dragover, and drop control the process
- Event drop must be called pre-Default so that the element can be removed
- Drag and drop useful for list sorting and file uploading
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.