HTML ondragend Attribute
Example
<p draggable="true" ondragend="myFunction(event)">Drag me!</p>
Meaning
The ondragend attribute specifies the script to be run at the end of a drag operation.
Note: To make an element draggable, use the global HTML5 draggable attribute.
Tip: A links and images are draggable by default there is no need of draggable attribute.
Standard Syntax
<element ondragend="script">
Applies to:
The ondragend attribute can be used on the following element:
| Element | Attribute |
|---|---|
| All visible elements. | ondragend |
Advertisement
Attribute Values
| Value | Description |
|---|---|
| script | Specifies the script to be run on ondragend |