android - 如何在 PhoneGap Android 中的 Touchstart 事件上使用 jQuery Mobile 滑动页面

标签 android jquery-mobile cordova-2.0.0

我使用 jQM 创建了一个滑动应用程序。它运作良好。 但是这个滑动事件是在从左向右滑动完成后执行的。我想要的是当用户同时滑动菜单时,菜单看起来像滑动 View 是可能的。

最佳答案

JQM 1.3.2 具有三个可以通过多种方式修改的滑动事件。

来自他们的文档:http://api.jquerymobile.com/swipe/

Triggered when a horizontal drag of 30px or more (and less than 75px vertically) occurs within 1 second duration but these can be configured:

The swipe event can also be extend to add your own logic or functionality. The following methods can be extended:

我想你想修改“$.event.special.swipe.start

我很惊讶您的事件没有更快地触发。默认设置状态他们需要做的就是在 1 秒内移动 30px。这就像小指运动的宽度。

PS - 虽然这可能不是“最佳答案”。我真的只是不想在评论中输入所有这些内容!

祝你好运!希望这能为您指明正确的方向。

关于android - 如何在 PhoneGap Android 中的 Touchstart 事件上使用 jQuery Mobile 滑动页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17314491/

相关文章:

jquery-mobile - Tablesorter 寻呼机不工作

ios - Cordova /phonegap 2.0 iOS

jquery-mobile - PhoneGap (Cordova),使用 Sencha Touch 2 还是 jQuery Mobile?

android - 图书馆项目 list 文件合并了吗?

android listview半透明选择一行的颜色

java - 无法处理收到的短信

javascript - jQuery Mobile——事件绑定(bind)

java - Android 的 Java 版本与 Java SE 版本有何关系?

jquery - 如何自动打开第一个collapsibleset集( Accordion )?

cordova - 使用 phonegap 检查设备的互联网连接