Use supportsTouch
instead of isMobile
.
This commit is contained in:
parent
09c0fb89d2
commit
68c297fe2c
@ -352,7 +352,7 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent);
|
var supportsTouch = (('ontouchstart' in window) || window.DocumentTouch && document instanceof window.DocumentTouch);
|
||||||
|
|
||||||
var initialize = function () {
|
var initialize = function () {
|
||||||
var ieMatch = navigator.userAgent.toLowerCase().match(/(msie) ([\w.]+)/);
|
var ieMatch = navigator.userAgent.toLowerCase().match(/(msie) ([\w.]+)/);
|
||||||
@ -364,7 +364,7 @@
|
|||||||
updateBarSizeAndPosition();
|
updateBarSizeAndPosition();
|
||||||
bindMouseScrollXHandler();
|
bindMouseScrollXHandler();
|
||||||
bindMouseScrollYHandler();
|
bindMouseScrollYHandler();
|
||||||
if (isMobile) {
|
if (supportsTouch) {
|
||||||
bindMobileTouchHandler();
|
bindMobileTouchHandler();
|
||||||
}
|
}
|
||||||
if ($this.mousewheel) {
|
if ($this.mousewheel) {
|
||||||
|
Loading…
Reference in New Issue
Block a user