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!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
+ 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 Respuestas
+ 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