我尝试在带有 jQueryMobile 的 Web 应用程序中使用 :target css3,但在 href 发送事件中使用哈希。
我尝试将 false 放在哈希事件上,但它不起作用。
你有什么方法或想法吗?
谢谢!
我去过这种类型的菜单:
<nav>
<ul>
<li><a href="#home"><img alt="Home" src="home.png"></a>
<li><a href="#apps"><img alt="Apps" src="apps.png"></a>
<li><a href="#pics"><img alt="Pics" src="pics.png"></a>
<li><a href="#chat"><img alt="Chat" src="chat.png"></a>
</ul>
</nav>
和这种部分:
<section id="home">
<h1>Welcome :)</h1>
<p>
without highly efficient portals. Distinctively recaptiualize bricks and
clicks laboration and idea sharing through holistic business models.
</p>
</section>
[...]
这个元素在一个页面上,我尝试使用这个 css3 :target
#home:target {
margin-top:-1200px;
}
但是 jQueryMobile 试图找到页面#home
我的手机 init 有:
$(document).bind("mobileinit", function(){
$.mobile.defaultPageTransition = 'flip';
$.mobile.ajaxEnabled = true;
$.mobile.hashListeningEnabled = false;
});
包在这里:http://www.oxynel.com/jqm-css3-target.zip
抱歉,我有图片,我只是在 jsfiddle 上发现示例!
最佳
法比安
最佳答案
在你的链接上尝试:
data-role="none"JQM 应该单独保留链接。
关于hash - JqueryMobile 使用 css3 目标设备,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7848540/