HTML5アプリのタッチイベント処理(touch, click, pointerの実装)方法

サンプルコード:
<script>
var obj = document.getElementById('id’);
obj.addEventListener('touchstart’, touchStart, false);
obj.addEventListener('touchmove’, touchMove, false);
obj.addEventListener('touchend’, touchEnd, false);
var touchMove = function(event) {
if (event.targetTouches.length == 1) {
// prevent default
event.preventDefault();
var touch = event.targetTouches[0];
// do something
}

};
</script>

jQuery

Posted by arkgame