Simple Swipe Gesture - Touch Events Handler
If you're on a touch device, swipe up, down, left or right to change the colour of the box.
Please view the source of this page for HTML markup and JS.Scrolling is ON Disable Page Scroll
- Swipe UP = Green
- Swipe DOWN = Yellow
- Swipe LEFT = Red
- Swipe RIGHT = Blue
- Tap = Purple
TIP: If up/down swipes are twitchy, toggle the button to disable scroll.
More demos and snippets
Did you find this useful? There are more demos and code snippets this way.