现在,用户点击图像,移开手指,释放手指并可以看到警报。 是否可以检查用户释放手指的位置以及是否仍然在原始图像上以向他显示警报?否则什么都不做。
答案 0 :(得分:1)
试试这个:
var touchedObject;
$('body').bind("touchstart", function(e){
touchedObject = $(this);
});
$('body').bind("touchend", function(e){
if (touchedObject == $(this)) {
//show alert
}
});