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/d207cde1beb2f114b8fdacc2ebf95361edc9a0f6/height=288;version=1;width=512/https%3A%2F%2Fw3g.jp%2Fogp.png)