0

This question has been probably asked many times but I can't actually find the answer nor here nor on Google. Probably I'm searching it with wrong words, so I decided to ask here on StackOverflow.

I'm using Hammer.js to handle the mobile gestures on the current website and what I'd like to do now is moving the divs horizontally as much as the thumb moves (like the Facebook's app gallery, for example).

I thought I can achieve it getting the coordinates X,Y of the point where the swipe event is recognized and then animate the move between the current viewport and the next "overflow hidden" div. What I'm missing is: which is the event listener that would listen at every thumb move so that I can calculate the distance in pixel between the current point and the starting point, automatically updating the value for the animate function?

1 Answer 1

0

the event you are looking for is touchmove

1
  • 1
    Damn, finally! I read the MDN doc and it seems to be exactly what I'm looking for. Thanks chee
    – Brigo
    Commented May 2, 2017 at 13:17

Not the answer you're looking for? Browse other questions tagged or ask your own question.