How to code a draggable image? | Sololearn: Learn to code for FREE!


How to code a draggable image?

4/15/2021 9:13:09 PM

Gayatri Ghosh

1 Answer

New Answer


<img src="" draggable="true"> However, that works only for the mouse pointer's event. You have to write a custom function that changes the css properties (left, top) of the selected image if you must use a touch event. The function could be hard to write, you update the position of a selected image on every frame