【问题标题】:jQuery Mobile page transition from left to rightjQuery Mobile 页面从左到右过渡
【发布时间】:2012-12-13 14:14:50
【问题描述】:

我有一个 android phonegap jquery 应用程序。我正在使用“swipeleft”功能更改我的页面。

当我向左滑动时我想显示下一页,向右滑动我想显示上一页。

通过这段代码,一切正常。但是

每次新页面从右到左。即逻辑上我想显示从左到右滑动的上一页。

这是我正在使用的代码

$("html").delegate("body", "swipeleft", function() {
$.mobile.changePage("index.html", {
        transition : "slide"
    });
});
});

jQuerymobile 中的任何代码,例如 slideleft 吗?

我尝试了很多..有什么想法吗?

【问题讨论】:

    标签: android jquery cordova jquery-mobile


    【解决方案1】:

    你试过reverse:true吗?

    $("html").delegate("body", "swipeleft", function() {
    $.mobile.changePage("index.html", {
            transition : "slide"
            reverse:true
        });
    });
    });
    

    【讨论】:

    • 感谢您的回复......当我尝试这个时,这将导致下一页并从那里再次调用并返回一页......即事件触发更多次......任何想法?
    • 请检查您是否在其他 js 文件中的某处两次附加了该事件。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-11-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-10-26
    • 1970-01-01
    相关资源
    最近更新 更多