Jquery mobile:禁用“点击切换”按钮固定页眉和页脚 [英] Jquery mobile: Disable "tap to toggle" fixed header and footer

查看:165
本文介绍了Jquery mobile:禁用“点击切换”按钮固定页眉和页脚的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法通过固定工具栏禁用淡入/淡出效果?
http://jquerymobile.com/ demos / 1.0.1 / docs / toolbars / footer-persist-a.html

Is there a way to disable the fade in / fade out effect on tap with fixed toolbar ? http://jquerymobile.com/demos/1.0.1/docs/toolbars/footer-persist-a.html

基本上任何时候你点击背景,或向下滚动,向上和向下,导航栏将淡出/淡出。

Essentially anytime you tap the background, or scroll, down and up, the nav bar will fade out/in.

我一直在寻找一段时间而且我遇到了这个

I have been looking for a while now and I came across this

[链接] 没有切换的jquery移动静态页脚

基本上它表示向下和向上淡入/淡出将在新更新中得到修复。 (如果你有任何关于如何解决这个问题的想法,直到更新,我会非常感激)

essentially it says that the scroll down and up fade in/out will get fixed in the new update. (If you have any ideas on how to get around this until the update, I would really appreciate it)

当我点击时,我也有切换页脚的问题背景。
我到目前为止找到的所有代码都没有运行良好。

I also have the problem of toggling the footer when I tap the background. All the code I have found so far hasn't worked well at all.

示例:
如何修复jQuery Mobile的固定页脚?

javascript中有效:/

javascript in there doesn't work :/

所以,如果您知道如何解决这些问题或提出建议,我将非常感谢

So please if you know how to solve these problems, or have suggestions, I would really appreciate it

推荐答案

如果你想禁用点击以切换版本Jquery Mobile 1.0的固定页脚你可以使用这样的东西:

If you want to disable the tap to toggle a fixed footer for version Jquery Mobile 1.0 you can use something like this:

$(function(){
  $.mobile.fixedToolbars.setTouchToggleEnabled(false);
});

Jquery Mobile 1.1将点击切换功能的设置方式更改为:

Jquery Mobile 1.1 changes the way you set the tap toggle feature to something like this:

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

或在JQM 1.1中你可以简单地设置data-tap-toggle =false:

or in JQM 1.1 you can simply set data-tap-toggle="false":

<div data-role="header" data-position="fixed" data-tap-toggle="false">

这篇关于Jquery mobile:禁用“点击切换”按钮固定页眉和页脚的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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