21 lines
679 B
JavaScript
21 lines
679 B
JavaScript
import jQuery from "jquery";
|
|
window.jQuery = jQuery;
|
|
window.$ = jQuery;
|
|
jQuery.event.special.touchstart = {
|
|
setup: function(_, ns, handle) {
|
|
if (ns.includes('noPreventDefault')) {
|
|
this.addEventListener('touchstart', handle, {passive: false});
|
|
} else {
|
|
this.addEventListener('touchstart', handle, {passive: true});
|
|
}
|
|
}
|
|
};
|
|
jQuery.event.special.touchmove = {
|
|
setup: function(_, ns, handle) {
|
|
if (ns.includes('noPreventDefault')) {
|
|
this.addEventListener('touchmove', handle, {passive: false});
|
|
} else {
|
|
this.addEventListener('touchmove', handle, {passive: true});
|
|
}
|
|
}
|
|
};
|