Can anyone help me... How to use drag and drop....? Give me a simple example to make it understand easily..... | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 5

Can anyone help me... How to use drag and drop....? Give me a simple example to make it understand easily.....

22nd Jun 2018, 4:53 PM
Divyanshi Sahu
Divyanshi Sahu - avatar
3 Respostas
+ 6
drag and drop is a event based mechanism. To make html5 elements draggable , we use the draggable attribute. when the draggable attribute is set to true value, the browser will automatically tell that the element is draggable. <div draggable="true"> dragstart, drag, dragenter, dragleave, drop, dragend these are examples of events that are fired up during dragging process. i hope these is useful :)
22nd Jun 2018, 6:07 PM
Random
Random - avatar
+ 5
Just set the draggable attribute of whichever element that you want to drag to ā€œtrueā€.
23rd Jun 2018, 4:55 AM
Scott