Skip to content
Advertisement

Detect a finger swipe through JavaScript on the iPhone and Android

How can you detect that a user swiped his finger in some direction over a web page with JavaScript?

I was wondering if there was one solution that would work for websites on both the iPhone and an Android phone.

Advertisement

Answer

Simple vanilla JS code sample:

JavaScript

Tested in Android.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement