[英]Jquery mobile: Disable “tap to toggle” fixed header and footer
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
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 我一直在寻找一段时间,我遇到了这个
[a link] jquery mobile static footer without toggle [链接] 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.
到目前为止我找到的所有代码都没有运行良好。
example : How to fix jQuery Mobile's fixed footer? 示例: 如何修复jQuery Mobile的固定页脚?
javascript in there doesn't work :/ javascript在那里不起作用:/
So please if you know how to solve these problems, or have suggestions, I would really appreciate it 所以,如果您知道如何解决这些问题或提出建议,我将非常感激
If you want to disable the tap to toggle a fixed footer for version Jquery Mobile 1.0 you can use something like this: 如果要禁用点击以切换版本Jquery Mobile 1.0的固定页脚,您可以使用以下内容:
$(function(){
$.mobile.fixedToolbars.setTouchToggleEnabled(false);
});
Jquery Mobile 1.1 changes the way you set the tap toggle feature to something like this: Jquery Mobile 1.1将您设置点击切换功能的方式更改为以下内容:
$(function(){
$('[data-role=header],[data-role=footer]').fixedtoolbar({ tapToggle:false });
});
or in JQM 1.1 you can simply set data-tap-toggle="false": 或者在JQM 1.1中,您只需设置data-tap-toggle =“false”:
<div data-role="header" data-position="fixed" data-tap-toggle="false">
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.