chkDivStl = document.createElement('div').style,
prefixes = [
'webkit', 'moz', 'Moz', 'ms', 'o'
];
SOY.Util.isTouch = isTouch = 'ontouchstart' in window;
SOY.Event.MOUSE_CLICK = 'click';
SOY.Event.MOUSE_DOWN = (isTouch) ? 'touchstart' : 'mousedown';
SOY.Event.MOUSE_MOVE = (isTouch) ? 'touchmove' : 'mousemove';
SOY.Event.MOUSE_UP = (isTouch) ? 'touchend' : 'mouseup';
SOY.Util.CSSType = {};
//check for transition type.
for (i = 0, l = prefixes.length; i < l; i++) {
if (prefixes[i] + 'Transition' in chkDivStl) {
SOY.Util.CSSType.TRANSITION = '-' + prefixes[i] + '-transition';
SOY.Util.CSSType.TRANSITION_DURATION = '-' + prefixes[i] + '-transition-duration';
break;
}
}
More than 5 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme