Reputation: 1450
Is it possible to detect a horiztonal touch event in JavaScript or JQuery?
Upvotes: 0
Views: 673
Reputation: 53198
Shameless self-plug > https://github.com/benmajor/jQuery-Mobile-Events
Upvotes: 0
Reputation: 309
If you understand how to read touch events, you can check the distance between touch start and current position. If touch end occurs before a minimum distance (your choice) then you can consider it a button click. If it is longer then you can consider it a swipe.
You can also use a directional delta to see the most likely direction intended (vertical or horizontal)
While not a complete answer, I hope this provides some clues to enhance your google-fu...
Upvotes: 0