Created
January 6, 2011 08:10
Revisions
-
dansimco revised this gist
Jan 6, 2011 . 1 changed file with 10 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,10 @@ 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'); } }); -
dansimco created this gist
Jan 6, 2011 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ 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'); } });