UAが各イベントに対応しているかどうか var _ua = (function(){ return { Touch:typeof document.ontouchstart != "undefined", Pointer:window.navigator.pointerEnabled, MSPoniter:window.navigator.msPointerEnabled } })(); UAがタッチイベントをサポートしているかどうかはdocument.ontouchstartがundefinedを返さないことを条件にし、ポインタイベントをサポートしているかどうかは、navigator.pointerEnabled(windowオブジェクトは省略可)を用います。なおIE10は先攻実装のため、ベンダー識別子を用いる必要があります。 対応するイベント名を割り当てる 先の比較表に応じて、必要なイ
![マウス・タッチ・ペンのタッチ操作イベント|Web制作 W3G](https://cdn-ak-scissors.b.st-hatena.com/image/square/9eee61084aa79c000f54e8701a9bebae3c95accd/height=288;version=1;width=512/https%3A%2F%2Fweb.w3g.jp%2Fogp.png)