Created
January 6, 2011 08:10
-
-
Save dansimco/767668 to your computer and use it in GitHub Desktop.
poopevent
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
btn.addEvent('touchend',function(event){ | |
var touchX = event.event.changedTouches[0].pageX; | |
var touchY = event.event.changedTouches[0].pageY; | |
var spotCoords = btn.getCoordinates(); | |
if(touchX>spotCoords.left && touchX<spotCoords.right && touchY>spotCoords.top && touchY<spotCoords.bottom){ | |
alert('TouchUpInside!!!'); | |
} else { | |
alert('Touch up outside'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment