Skip to content

Instantly share code, notes, and snippets.

View nimahkh's full-sized avatar
🤩
Yo u can do everything you want

Nima Habibkhoda nimahkh

🤩
Yo u can do everything you want
  • Software Engineer
  • The Netherlands
  • X @nimahkh1
View GitHub Profile
@nimahkh
nimahkh / swipe.js
Created January 7, 2020 08:06 — 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;