Created
July 7, 2012 19:08
-
-
Save dansimco/3067704 to your computer and use it in GitHub Desktop.
touchUpInside
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
isTouchInside = function(e){ | |
var event = e.originalEvent; | |
touch_inside = false; | |
if (! event.touches[0] ) return touch_inside; | |
touchX = event.touches[0].pageX; | |
touchY = event.touches[0].pageY; | |
if( | |
touchX > element_coords.left && | |
touchX < element_coords.right && | |
touchY > element_coords.top && | |
touchY < element_coords.bottom | |
){ | |
touch_inside = true; | |
} | |
return touch_inside; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment