Skip to content

Instantly share code, notes, and snippets.

View alphadimension's full-sized avatar
😊

Alpha Dimension alphadimension

😊
View GitHub Profile
@cemerson
cemerson / hold.js
Created April 15, 2013 13:50
JavaScript: Touch/Click and Hold
var element;
document.addEventListener('touchstart', function(event) {
event.preventDefault();
var touch = event.touches[0];
element = document.elementFromPoint(touch.pageX,touch.pageY);
}, false);
document.addEventListener('touchmove', function(event) {
event.preventDefault();
var touch = event.touches[0];