如何在 jQuery Mobile 中向上滑动和向下滑动事件?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19808917/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-27 00:38:10  来源:igfitidea点击:

How to get swipe up and swipe down event in jQuery Mobile?

jqueryjquery-mobile

提问by Muath

Can you please tell me how to get the "swipe up" and "swipe down" events in jQuery Mobile? I am able to get "swipe right" and "swipe left" event.

你能告诉我如何在 jQuery Mobile 中获得“向上滑动”和“向下滑动”事件吗?我能够获得“向右滑动”和“向左滑动”事件。

Can I use third party library? Can you please give one alert/console in fiddle to get these event?

我可以使用第三方库吗?您能否在小提琴中发出一个警报/控制台以获取这些事件?

回答by Muath

it is the same as my question

这和我的问题一样

FIDDLE

小提琴

just ill show you how to use swipe up and down events..

只是告诉你如何使用向上和向下滑动事件..

$('#mydiv').on('swipedown',function(){alert("swipedown..");} );
$('#mydiv').on('swipeup',function(){alert("swipeup..");} );