admin管理员组文章数量:1389833
I have a page that is served up with jQuery mobile. In all of my mobile devices, when I press another link or image or any other javascript enabled element that uses a javascript event (like onclick), the header in my layout disappears. It actually doesn't really disappear though, it just has it's position property changed to not be fixed. when I scroll up to the top of my page, my header image is there and it scrolls with the rest of the page. Then when I click another javascript enabled element on the page, it changes the header back to fixed again.
This behavior goes back and forth with any element I click on the page...really weird.
anyone else seen this? Anyone know how to fix it?
here is my layout:
<div data-role="page" id="page1" data-add-back-btn="false">
<div data-theme="a" data-role="header" data-position="fixed">
<div style="text-align:left;padding-top:5px;padding-left:3px;">
<img src="/images/mylogo.png" alt="Logo" />
</div>
</div>
<div data-role="content">
@{Html.RenderAction("Items", "Feedback", new {area=""});}
@RenderBody()
</div>
</div>
TIA
I have a page that is served up with jQuery mobile. In all of my mobile devices, when I press another link or image or any other javascript enabled element that uses a javascript event (like onclick), the header in my layout disappears. It actually doesn't really disappear though, it just has it's position property changed to not be fixed. when I scroll up to the top of my page, my header image is there and it scrolls with the rest of the page. Then when I click another javascript enabled element on the page, it changes the header back to fixed again.
This behavior goes back and forth with any element I click on the page...really weird.
anyone else seen this? Anyone know how to fix it?
here is my layout:
<div data-role="page" id="page1" data-add-back-btn="false">
<div data-theme="a" data-role="header" data-position="fixed">
<div style="text-align:left;padding-top:5px;padding-left:3px;">
<img src="/images/mylogo.png" alt="Logo" />
</div>
</div>
<div data-role="content">
@{Html.RenderAction("Items", "Feedback", new {area=""});}
@RenderBody()
</div>
</div>
TIA
Share Improve this question edited Jul 29, 2013 at 14:01 Tushar Gupta - curioustushar 57.1k24 gold badges106 silver badges109 bronze badges asked Dec 17, 2012 at 22:44 Christopher JohnsonChristopher Johnson 2,6298 gold badges40 silver badges70 bronze badges2 Answers
Reset to default 8Not sure if this solves your problem, but I had the same problem except that it happened no matter where and what I clicked.
I added data-tap-toggle="false"
to the fixed element.
Hope it works for you!
This is amazing. Has helped me in getting this fixed on an application. It was weird that it occurred on binding a class within the list options. When clicking any option in the list, the header and footer became movable and then on another click they became fixed.
Used the attribute data-tap-toggle="false"
as suggested by you in the header
and the footer
and it works like a charm. Thanks.
版权声明:本文标题:jQuery mobile header disappears (becomes non-fixed) when another javascript action is hit - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744574124a2613518.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论