+ 7

Slide control - js

Someone have a code or can show me how to detect when the user slide the screen with his finger horizontally <==> ?

26th Sep 2017, 4:31 PM
NoxFly
NoxFly - avatar
4 Answers
+ 7
onScroll isn't vertically ? my goal is, when you slide from right to left: a <div> hidden to the right side of the screen move to the left to cover all screen ------------------- |||||||| <-- <-- |||||||| |||||||| --------------------
26th Sep 2017, 5:47 PM
NoxFly
NoxFly - avatar
+ 4
result : why doesn't work 😭 https://code.sololearn.com/WnlimpfL5QcJ/?ref=app
27th Sep 2017, 5:08 AM
NoxFly
NoxFly - avatar
+ 3
At first sight: isn't it onScroll?
26th Sep 2017, 4:35 PM
Andrew Harchenko (Tomsk)
Andrew Harchenko (Tomsk) - avatar
+ 1
May be this one can help: https://stackoverflow.com/questions/11866345/mobile-touch-enabled-screens-horizontal-scroll-on-swipe (I myself like some kind of minimalist do not like a need to include more libraries for some basic in my opinion procedures/operations and more of that: to use plugins for those libraries [đŸ˜±] not knowing how to do that stuff using clean vanilla JS, but...)
26th Sep 2017, 5:52 PM
Andrew Harchenko (Tomsk)
Andrew Harchenko (Tomsk) - avatar