ITeye博客

touchmove获取clientX

cxy020 · 2014-07-10 14:05 · 随笔 · Web前端 · Markdown

$("body").bind('touchmove', function(e){ 
//stops normal scrolling with touch
e.preventDefault();

console.log(event.touches[0].pageX);
console.log(event.touches[0].clientX);
})

 You are right, seems like a bug. You could hack around it by offsetting the scroll of the page (event.targetTouches[0].screenY - $(window).scrollTop() )

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。