And*_*rle 12 javascript touch-event
当touchend事件绑定到touchstart触发的元素时,如何将元素放在手指离开的位置,此时元素位于绑定事件的元素之外.
Arm*_*ier 15
您可以使用该document.elementFromPoint方法,将事件的坐标传递给它:
$('#element').on("touchend",function(event){
var endTarget = document.elementFromPoint(
event.originalEvent.touches[0].pageX,
event.originalEvent.touches[0].pageY
);
});
Run Code Online (Sandbox Code Playgroud)
编辑: 找到一些关于在特定坐标处获取元素的好文章. http://www.zehnet.de/2010/11/19/document-elementfrompoint-a-jquery-solution/