jQuery的移动静态页脚没有切换 [英] jquery mobile static footer without toggle

查看:70
本文介绍了jQuery的移动静态页脚没有切换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个页脚固定的页面

I have a page with a fixed footer

<div data-role="page" id="next_collection" data-theme="d">
    <div data-role="header" data-theme="elw">
        Title
    </div>
    <div data-role="content" style="min-height: 246px;">
        Some content
    </div>
    <div data-role="footer" data-id="footer_nav" data-position="fixed">
        <a href="#business_hours"><img src="images/icon.png" /></a>
    </div>
</div>

这在Android和iPod上有效,但在iPhone 4s上,如果您触摸屏幕,它将切换(隐藏/显示)页脚.我试图在旧问题中修复它,但这不是工作了.对于$.mobile.fixedToolbars.setTouchToggleEnabled(),我得到:

This works on Android and iPod, but on iPhone 4s it toggles (hide/show) the footer if you touch the screen. I tried to fix it like in this old question but this does not work anymore. For $.mobile.fixedToolbars.setTouchToggleEnabled() i get:

$.mobile.fixedToolbars is undefined

如何阻止页脚在新版本中切换?

How to stop the footer from toggle in the newer versions?

推荐答案

正如@commadelimited所说,切换功能是以前版本中没有的新功能.

As @commadelimited says, the toggle has been a new feature not available in prior versions.

要添加到页眉或页脚中以删除该切换功能的元数据是:

The meta data to add to your header or footer to remove that toggle feature is:

data-tap-toggle="false"

因此,在您的情况下,页脚应如下所示:

so, in your case, the footer should looks like:

<div data-role="footer" data-id="footer_nav" data-position="fixed" data-tap-toggle="false">
    <a href="#business_hours"><img src="images/icon.png" /></a>
</div>

这应该是他们网站上的某种参考:

And here should be some kind of reference from their site: link to google search

这篇关于jQuery的移动静态页脚没有切换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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