123movies-seo/resources/js/jqfix.js

22 lines
679 B
JavaScript
Raw Permalink Normal View History

2024-08-24 23:08:42 +03:00
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});
}
}
};