如何修复jQuery Mobile的固定页脚? [英] How to fix jQuery Mobile's fixed footer?
问题描述
使用jQueryMobile,我在标记中包含了 data-role =footerdata-position =fixed
,但仍存在两个错误:
Using jQueryMobile, I've included data-role="footer" data-position="fixed"
in the markup, but two bugs persist:
- 页脚在空单击事件上切换。
- 页脚未修复,并隐藏部分页面内容。
我正在测试iPhone 3g。有什么想法吗?
I'm testing with iPhone 3g. Any ideas?
提前致谢。
更新:似乎是click事件修改当前页面的页脚,并将 ui-fixed-overlay
更改为 ui-fixed-inline
,哪个课程的样式为 display:none
以防止其他页面的页脚出现。
UPDATE: It seems that the click event modifies the current page's footer, and changes ui-fixed-overlay
to ui-fixed-inline
, which of course is styled display:none
to prevent the other pages' footers from appearing.
如何防止此修改?
推荐答案
如果使用 1.1或更高版本,请添加 data-tap- toggle =false
到你的页眉和页脚,如在此处记录。
If using 1.1 or later, add data-tap-toggle="false"
to your header and footer, as documented here.
如果您使用的是jQuery Mobile 1.1之前的版本,请在加载前进行以下操作jQuery Mobile:
If you're using a version of jQuery Mobile prior to 1.1, place the following before loading jQuery Mobile:
$(document).bind("mobileinit", function(){
$.mobile.touchOverflowEnabled = true;
}); // remove
这篇关于如何修复jQuery Mobile的固定页脚?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!