lib/tap.js
function Tap(el) {
    this.el = typeof el === 'object' ? el : document.getElementById(el);
    this.moved = false; //flags if the finger has moved
    this.startX = 0; //starting x coordinate
    this.startY = 0; //starting y coordinate
    this.hasTouchEventOccured = false; //flag touch event
    this.el.addEventListener('touchstart', this, false);
    this.el.addEventListener('mousedown', this, false);
}
function Tap(el) {
    this.el = typeof el === 'object' ? el : document.getElementById(el);
    this.moved = false; //flags if the finger has moved
    this.startX = 0; //starting x coordinate
    this.startY = 0; //starting y coordinate
    this.hasTouchEventOccured = false; //flag touch event
    this.el.addEventListener('touchstart', this, false);
    this.el.addEventListener('mousedown', this, false);
}
function Tap ( el ) { this . el = typeof el === 'object' ? el : document . getElementById ( el ) ; this . moved = false ; //flags if the finger has moved this . startX = 0 ; //starting x coordinate this . startY = 0 ; //starting y coordinate this . hasTouchEventOccured = false ; //flag touch event this . el . addEventListener ( 'touchstart' , this , false ) ; this . el . addEventListener ( 'mousedown' , this , false ) ; }
/*!
tap.js
Copyright (c) 2015 Alex Gibson
https://github.com/alexgibson/tap.js/
Released under MIT license
/ * ! tap . js Copyright ( c ) 2015 Alex Gibson https : // github . com / alexgibson / tap . js / Released under MIT license