Reputation: 87
Now user taps the image, moves the finger away, release finger and can see the alert. Is it possible to check where user release finger and if he still on original image to show him alert? Otherwise do nothing.
Upvotes: 0
Views: 138
Reputation: 10994
Try this:
var touchedObject;
$('body').bind("touchstart", function(e){
touchedObject = $(this);
});
$('body').bind("touchend", function(e){
if (touchedObject == $(this)) {
//show alert
}
});
Upvotes: 1