MyXoToD / js_slide_lib

1 stars 0 forks source link

Doesn't work at mobile #1

Open waqasy opened 10 years ago

waqasy commented 10 years ago

Its working cool at my laptop. I tested at android/chrome. It didn't work. Whats the point of such swipe function, which doesn't work at mobile.

MyXoToD commented 10 years ago

This has never been mention as a mobile framework. It was just a test I made for myself and I came up with this "really basic prototype", so I thought I'm going to share it here on github so everyone can use it for whatever. I've never tested it on mobile so far because I had no use case.

Probably you can easily adjust the code to work on mobile device. Mobile device don't usually have mouse events, so you need to change it somehow to on finger down and on finger up. I don't know. I guess this prototype wouldn't be good at all for mobile because the callback only gets triggered when the swipe is done (on mouse up), so anything wouldn't swipe as the user swipes.

Anyway, thanks for the feedback. Maybe I will adjust the prototype to work a little bit more comfortable. Unfortunately I've not enough spare time atm.

EDIT// Found this: http://stackoverflow.com/a/11145262/2783423 touchstart and touchend could do the trick for you.