简体   繁体   English

是否可以检测移动设备上的点击和拖动?

[英]Is it possible to detect tap and drag on mobile devices?

As the title states, is there a way to detect if a mobile user is doing a tap and drag with javascript / jquery? 如标题所述,有没有一种方法可以检测移动用户是否正在使用javascript / jquery进行点击和拖动? Running into a user experience issue where ripple effects I have set on elements is activate while tap & dragging / browsing content on mobile devices. 遇到用户体验问题,在移动设备上点击和拖动/浏览内容时,会激活我在元素上设置的涟漪效应。

I would recommend using jQuery touch punch for that. 我建议为此使用jQuery触摸打孔

You have great documentation and lots of events you can hook into for all sorts of tasks. 您拥有出色的文档和许多事件,可以将它们挂接到各种任务上。

You can do things like Drag/Drop, Resize and more.. 您可以执行诸如拖放,调整大小等操作。

Have a look at JQuery Mobile . 看看JQuery Mobile It has tap and swipe events. 它具有点击滑动事件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM