Skip to content

Instantly share code, notes, and snippets.

View VaseaLuca's full-sized avatar

Luca Vasile VaseaLuca

View GitHub Profile
const requiredValues = ["name", "country"];
const products = [
{
key: 1,
name: "",
country: "",
},
{
key: 2,
@SleepWalker
SleepWalker / swipe.js
Created September 30, 2015 04:59
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;