+ 5

Why this code work only on pc and not working on smart phones?

https://code.sololearn.com/WanUVW5OD3C2/?ref=app

10th Sep 2018, 10:13 PM
Ehab Samir
Ehab Samir - avatar
7 Respostas
12th Sep 2018, 12:48 AM
Benneth Yankey
Benneth Yankey - avatar
+ 5
On drag events works mostly on pc, some mobile deviced don't listen to on drag events. Mobile has a touchmove events. You should try it. :)
10th Sep 2018, 11:47 PM
Email Not Activated
+ 5
LONGTIE👔 Nope. Only for touch screens.
11th Sep 2018, 12:17 AM
Email Not Activated
+ 5
Sleepy Koala so both would be good?
11th Sep 2018, 12:19 AM
LONGTIE👔
LONGTIE👔 - avatar
+ 5
Yes. More info about touchmove event: https://www.w3schools.com/jsref/event_touchmove.asp
11th Sep 2018, 12:19 AM
Email Not Activated
+ 4
Most mobile devices do not listen to the drag events that are bound to the DOM. I would recommend using the touchmove event and the events that go along with with it.
10th Sep 2018, 10:23 PM
Oskar Niedbalski
Oskar Niedbalski - avatar
+ 2
Oskar Niedbalski Sleepy Koala now I'm wondering... Will touchmove work on the computer?
11th Sep 2018, 12:16 AM
LONGTIE👔
LONGTIE👔 - avatar