【问题标题】:Navbar not fixed while transition jquery mobile过渡jquery mobile时导航栏未修复
【发布时间】:2014-08-21 05:57:36
【问题描述】:

我是 jquery mobile 的新手。我在通过导航栏按钮从一个页面导航到另一个页面时实现导航栏。导航栏也在滑动,就像 ios 导航栏粘在底部并查看幻灯片一样。如何消除此错误

<div data-role="footer" data-position="fixed">      
            <div data-role="navbar" data-iconpos="top">
                <ul>
                    <li><a href="#" data-icon="comment" class="ui-btn-active ui-state-persist">Message</a></li>
                    <li><a href="profile.html" data-transition="slide"  style="text-decoration:none" data-icon="gear">Settings</a></li>
                    <li><a href="#" data-icon="cloud">Share</a></li>
                </ul>
            </div><!-- /navbar -->
        </div><!-- /footer -->

现在点击个人资料导航栏也会滑动。

【问题讨论】:

标签: jquery jquery-ui jquery-mobile


【解决方案1】:

你需要添加 data-position="fixed",在 header 标签中添加 style data-id="foo",然后只添加 class="ui-btn-active ui-state-persist" 到 ative 链接。

见参考: http://demos.jquerymobile.com/1.1.0/docs/toolbars/footer-persist-d.html

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-10-29
    • 2012-03-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多