By default, only image and text can be draggable. To drag an image, you simply hold the mouse button down and then move it. To drag the text, you need to highlight some text and drag it in the same way as you would drag an image.
The draggable attribute can have the following values: true: the element can be draggable. false: the element cannot be draggable. auto: drag is the default browser behavior.
To make an object draggable set draggable=true on that element. Just about anything can be drag-enabled: images, files, links, files, or any markup on your page.
The draggable global attribute is an enumerated attribute that indicates whether the element can be dragged, either with native browser behavior or the HTML Drag and Drop API.
So the question is : How can you do that ? I want to change the draggable
attribute to "false"
so the element that was previously draggable will lose this property.
I will give you a div so you will have something to start with :
<div id="div1" draggable="true" ondragstart="drag(event) "onDblClick="edit('div1')">
</div>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With