draggable
Summary
Gets or sets whether an element can be dragged and dropped.
Property of dom/HTMLElementdom/HTMLElement
Syntax
var draggable = element.draggable;
element.draggable = draggable;
Return Value
Returns an object of type BooleanBoolean
Whether the element is draggable.
Usage
Use this property to allow or disallow an element to be dragged and dropped.
Notes
The default value for most elements is false. a and img elements are draggable by default.
Related specifications
- WHATWG HTML
- Living Standard
- HTML5
- Working Draft