touchイベント、transform3d対応かどうかのチェック
var support = {
transform3d: ('WebKitCSSMatrix' in window && 'm11' in new WebKitCSSMatrix()),
touch: ('ontouchstart' in window)
}
touchイベントがあるか、transform3dに対応しているかのチェック方法。
使い方は
touchStartEvent = support.touch ? 'touchstart' : 'mousedown';
みたいにして使える。
よく使ってるけど、いちおうメモとして。