【问题标题】:jquery mobile static footer navbarjquery移动静态页脚导航栏
【发布时间】:2011-08-05 21:46:29
【问题描述】:

找到这个答案In Jquery mobile, Header and footers are always hiding, when clicking inside the page?

我唯一的区别是我没有 data-fullscreen="true" 但有一个 data-cache="never"。

页脚栏不断淡入淡出。只希望页脚导航栏位于屏幕底部而不会褪色。

<div data-role="page" data-cache="never" id="mainPage">
<script>
$('#mainPage').live('pagecreate', function (event) {

    $.fixedToolbars.setTouchToggleEnabled(false);

});
</script>
....header stuff
<div data-role="content" id="mainContent">
....
</div>
<div data-role="footer" data-theme="a" data-position="fixed">
  <div data-role="navbar">
    <ul>
      ... 4 li's
    </ul>
  </div>
</div>
</div>

编辑

我们开始吧。这是怎么做到的? http://jquerymobile.com/test/experiments/scrollview/#../../docs/toolbars/footer-persist-a.html

页眉会立即加载,但页脚不会。希望我的页脚像该页面的页眉一样。

【问题讨论】:

标签: jquery jquery-mobile


【解决方案1】:

这在 jQueryMobile 1.1 rc1 中已修复。见this link

在页脚使用 data-tap-toggle="false"

【讨论】:

    【解决方案2】:

    它应该可以工作。
    滚动列表时只有一个问题:导航栏消失了,但一旦您停止滚动,它就会重新出现。 你可以看到一个小提琴here

    【讨论】:

    • 是的,页脚确实“实际上更好”了,但在不会发生淡入/淡出的情况下寻找更原生的感觉。
    【解决方案3】:
            $(document).bind("mobileinit", function() {
                 $.support.touchOverflow = true;
    
                  $.mobile.touchOverflowEnabled = true;
                  $.mobile.fixedToolbars.setTouchToggleEnabled(false);
    
            });
    

    这行得通。在 Android 2.3 中测试

    【讨论】:

      猜你喜欢
      • 2017-08-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-02-12
      • 2023-03-07
      • 2022-10-13
      • 1970-01-01
      相关资源
      最近更新 更多