【问题标题】:Detecting swipe movements to go to another web page on an ipad web app检测滑动动作以转到 ipad 网络应用程序上的另一个网页
【发布时间】:2011-06-26 12:27:44
【问题描述】:

我目前正在尝试设置一个 iPad 网络应用程序。我有我的主页,但希望用户向左滑动并被带到关于页面。我找到了一种从 padilicious.com 检测移动的方法,但不知道如何让滑动改变页面。

【问题讨论】:

    标签: iphone ipad web-applications swipe


    【解决方案1】:

    假设您使用来自padilicious 的移动检测:

    if ( swipeDirection == 'left' ) {
        window.location.href = 'about.html';
    }
    

    【讨论】:

    • 谢谢,这正是我想要的。如果我希望移动到另一个页面是幻灯片,我是否必须将每个页面的内容存储在另一个 div 中,然后让手指滑动将页面移动到选定的 div?
    • 是的,或者您可以通过 ajax 将下一页的内容动态加载到 div 中(但可能不那么流畅)
    猜你喜欢
    • 1970-01-01
    • 2015-01-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多