Drag'n drop - html - css - jquery | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 8

Drag'n drop - html - css - jquery

I've creat a div like a square, and I want to the user can move it. but with drag and drop, I read a lot of forul about this, doesn't work (I want it to be possible on mobile, the computer I do not care) how to do ? even with the code created by Visph (drag and drop again) I can't move objects. I've try with android 4.4.4 and 7.0 https://code.sololearn.com/Wg2VViGI2KKv/?ref=app

29th Sep 2017, 2:04 PM
NoxFly
NoxFly - avatar
12 Answers
+ 4
This uses a lib called slim to do drag and drop of any elements https://code.sololearn.com/WgZg39ucD3l4/?ref=app
29th Sep 2017, 2:10 PM
Calviղ
Calviղ - avatar
+ 7
@I write all my codes in ES2015, the error is caused by 'let'. You may change all declared and instantiated variables with 'let' to 'var' then run.
30th Sep 2017, 5:05 PM
Benneth Yankey
Benneth Yankey - avatar
+ 5
thanks ! 😀
29th Sep 2017, 2:36 PM
NoxFly
NoxFly - avatar
+ 5
line 9 : unexpexted strict word reserved word (error) @Ben Bright
30th Sep 2017, 9:31 AM
NoxFly
NoxFly - avatar
+ 5
there is only one libs which can be used for me https://draggabilly.desandro.com the libs by other or by jquery ui doesn't works...
30th Sep 2017, 11:01 AM
NoxFly
NoxFly - avatar
+ 5
can you show us your code please ?
12th Oct 2017, 5:37 PM
NoxFly
NoxFly - avatar
29th Sep 2017, 10:29 PM
Benneth Yankey
Benneth Yankey - avatar
+ 4
@Calvin, I want to be able to move them anywhere, not only horizontally, and when I release them they land where I dropped
30th Sep 2017, 9:31 AM
NoxFly
NoxFly - avatar
+ 4
it's excellent, gg :D
30th Sep 2017, 5:07 PM
NoxFly
NoxFly - avatar
+ 1
how do you create 2 evenly column in HTML and CSS? I did twofold { column-count: 2; } but it doesn't work.
12th Oct 2017, 5:32 PM
Fred Smith
Fred Smith - avatar
0
Nice, even though but You should to put the tag script in JS folder and not in HTML folder
29th Sep 2017, 2:49 PM
Juan Diego Gomez
Juan Diego Gomez - avatar
0
students ('John Smith', 'MIT');
17th Dec 2020, 5:18 AM
Jon-Jon Redoblado
Jon-Jon Redoblado - avatar