jQuerymobile + phonegap:点击切换,滑块,页脚问题 [英] Jquerymobile + phonegap : tap-toggle, slider , footer issues

查看:94
本文介绍了jQuerymobile + phonegap:点击切换,滑块,页脚问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在移动设备上运行时,我制作了一个jquerymobile + phonegap应用程序,但遇到了一些问题. 1)我的应用程序在单个html文件中有7页,在页脚上有两个按钮,当我单击该按钮时,它会滑动到下一页,但是我看到类似行的导航在滑动时会出现,这很烦人. 2),当我单击按钮时,它正在将颜色更改为页脚主题,几秒钟后,它正在加载其原始主题,这看起来也很烦人. 3)并且我的页眉和页脚一直在切换,我尝试 data-tap-toggle ="false"

I made a jquerymobile + phonegap application when i am running on the mobile device i am facing few issues. 1) My app has 7 pages in single html file, two buttons on footer when i click on the button it slides to next page, but i see a navigation like line appearing while sliding which is annoying. 2) and when i clicking on the button , it is changing the color to the footer theme and after few secs it is loading its original theme which is also annoying to look. 3) and my header and footer toggle all the time , i tried data-tap-toggle="false" and

$(document).bind('pageinit', function(event) {
 $("[data-role=header]").fixedtoolbar({ tapToggle: false });
 $("[data-role=footer]").fixedtoolbar({ tapToggle: false });
});

仍然无法正常工作

任何有关此的信息都将受到赞赏.

Any information on this is appreciated.

推荐答案

尝试这个

$(document).bind("mobileinit", function() {
    $.mobile.ajaxEnabled = false;
    $.mobile.linkBindingEnabled = false;
    $.mobile.hashListeningEnabled = false;
    $.mobile.pushStateEnabled = false;
    // Remove page from DOM when it's being replaced
    $('div[data-role="page"]').live('pagehide', function(event, ui) {
        $(event.currentTarget).remove();
    });
    $("[data-role=header]").fixedtoolbar({ tapToggle: false });
    $("[data-role=footer]").fixedtoolbar({ tapToggle: false });

});

资源: https://github.com/datomnurdin/service-finder-mobile

这篇关于jQuerymobile + phonegap:点击切换,滑块,页脚问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆