Skip to content

Instantly share code, notes, and snippets.

@Tam
Tam / Swipe-Example.js
Created June 2, 2016 09:38
Vanilla JavaScript Swipe Detection
new Swipe(document.getElementById("gallery"), function(event, direction) {
event.preventDefault();
switch (direction) {
case "up":
// Handle Swipe Up
break;
case "down":
// Handle Swipe Down
break;