PhoneGap - Android - 在phonegap中滑动导航

Pre*_*oid 10 html5 android jquery-mobile cordova

我正在为Android平台制作一个phonegap应用程序.在这个应用程序中,我想在多个html页面内滑动导航.请告诉我怎么做到这一点.它可以在单个html页面中完成,也可以为此滑动导航创建多个html页面.

提前致谢.普里特

vik*_*kky 8

如果您正在使用jquery mobile,那么很容易做到这一点,因为jquery支持滑动,swipeleft和swiperight触摸事件.

刷卡

当用户垂直(20或更少像素)或水平(30或更多像素)滑动时触发的滑动事件

swipeleft

当用户向左滑动30个或更多像素时触发的左向滑动

swiperight

当用户滑动到右侧30个或更多像素时触发的右向滑动

用这个:

<script>
$("ul").delegate("li", "swipe", function() {
 // The user has swiped to the right on a list view item. Show an edit menu.
$(this).find(".menu-edit").show();
})
</script>
Run Code Online (Sandbox Code Playgroud)