要素にjQueryプラグインが添付されているため、そのプラグインがMobile上でのみ動作するのを止めたいと考えています。別のプラグインが接続されている、ライトボックスですが、私は誰かがモバイルかデスクトップかどうかに関係なく滞在したいと思います。ここでhttps://github.com/mattbryson/TouchSwipe-Jquery-PluginjQueryプラグインをモバイルでのみ無効にしますか?
コードされています:
これは私がモバイル上で停止したいプラグインがある
// Adding in the plugin
$(function() {
$(playlist).swipe({
swipeStatus:function(event, phase, direction, distance, duration) {
// code for swipy stuff here ....
// ...
// ...
}
});
// Trying to remove the plugin
window.onresize = function(event) {
var deviceWidth = $(window).width();
if(deviceWidth <= 768) {
$(playlist).swipe({
swipeStatus:function(event, phase, direction, distance, duration) {
event.preventDefault();
event.stopPropagation();
},
threshold: 0,
fingers:'all'
});
}
};
は、あなたが任意のアイデアを得た場合、私に教えてください。また、プレイリストを切り離してDOMに再接続しようとしましたが、それも動作しませんでした。
ありがとうございます!