Skip to content

Instantly share code, notes, and snippets.

View TheArtifulProgrammer's full-sized avatar
🎯
Focusing

TheArtfulProgrammer TheArtifulProgrammer

🎯
Focusing
View GitHub Profile
@TheArtifulProgrammer
TheArtifulProgrammer / swipe.js
Created September 20, 2022 11:29 — forked from SleepWalker/swipe.js
A simple swipe detection on vanilla js
var touchstartX = 0;
var touchstartY = 0;
var touchendX = 0;
var touchendY = 0;
var gesuredZone = document.getElementById('gesuredZone');
gesuredZone.addEventListener('touchstart', function(event) {
touchstartX = event.screenX;
touchstartY = event.screenY;