#タッチデバイスを判定するには?
javascript
function isTouchDevice() {
var result = false;
if (window.ontouchstart === null) {
result = true;
}
return result;
}
if (isTouchDevice()) {
console.log('touch device');
} else {
console.log('not touch device');
}