【问题标题】:PhoneGap - Android - swipe navigation in phonegapPhoneGap - Android - 在 phonegap 中滑动导航
【发布时间】:2012-05-28 21:44:06
【问题描述】:

我正在为 android 平台制作一个 phonegap 应用程序。在这个应用程序中,我想在多个 html 页面中滑动导航。请告诉我我该怎么做。 要么是在单个 html 页面中完成,要么我必须为此滑动导航创建多个 html 页面。

提前致谢。 预知

【问题讨论】:

    标签: android html jquery-mobile cordova


    【解决方案1】:

    如果您使用的是 jquery mobile,那么很容易做到这一点,因为 jquery 支持 swipe、swipeleft 和 swiperight 触摸事件。

    滑动

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

    向左滑动

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

    向右滑动

    向右滑动,当用户向右滑动 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>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-10-15
      • 2016-12-23
      • 1970-01-01
      • 1970-01-01
      • 2018-12-06
      • 2012-07-13
      • 1970-01-01
      相关资源
      最近更新 更多