0
How Do You Drag A Picture
How Do I Make A Picture Draggable Using The <img src="(picture URL)"> tag?
6 Réponses
+ 3
The draggable attribute does not work as expected on SoloLearn... but I was able to get the event to fire.
https://code.sololearn.com/Wj6fxaYu736Z/?ref=app
Tap and hold to see the alert -- which (if you hide the alert) may result in a browser starting true dragging. In the app, I think you'll have to implement the drag by hand.
This is private / unfinished; it's one of my 'just checking' codes.
edit: If you follow the link I kept for myself, it leads to an answer with draggable squares (it's using ES6 syntax):
https://code.sololearn.com/Wdhhd3yG5Z7l/?ref=app
+ 1
#Youssef
You can use only touchmove event to move an image.
That's the most simpler method.
+ 1
touchmove event triggered when the touched element is being moved.
0
@Calvin is there anything simpler?
0
@Calvin And What Is The Tag Of Touchmove?