---
title: "touchmove获取clientX"
author: "cxy020"
date: "2014-07-10T14:05:15Z"
tags: []
categories: ["Web前端"]
slug: "touchmove-clientx"
draft: false
lastmod: "2014-07-10T14:05:15Z"
id: 2090345
url: "https://cxy020.iteye.com/blog/2090345"
---

```
$("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() )`