Draggable text in html | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

Draggable text in html

Hi everyone! I am trying to write an HTML code that will allow me to drag simple text, but I can't get it to work. The lesson on Sololearn only explains making images draggable, but their "additional note" says that any HTML5 element can have this option. Could someone please explain to me what I am doing wrong? I will appreciate any help :) https://code.sololearn.com/WPQ3r9WX6J39/?ref=app

26th Jul 2017, 4:12 AM
Sarah
Sarah - avatar
4 Answers
+ 10
If you're trying to run it on mobile(code playground or browser on device), this will probably help: https://stackoverflow.com/questions/20927759/html5-drag-and-drop-for-mobile
27th Jul 2017, 8:31 AM
Farshad
Farshad - avatar
+ 2
Sorry! It doesn't look like the right code attached. Here it is: https://code.sololearn.com/WPQ3r9WX6J39/?ref=app
26th Jul 2017, 4:14 AM
Sarah
Sarah - avatar
0
Your problem might be that you have two different element tags. The element tags with the text in between should be the tag with the draggable property
28th Jul 2017, 1:38 PM
Corey
Corey - avatar
28th Jul 2017, 1:47 PM
Corey
Corey - avatar