0
好吧,有人会帮我弄清楚为什么在下面的代码中的“测试”李是不可见的?我检查了活dom和元素似乎正在处理:jQuery Mobile动态内容插入
<!DOCTYPE HTML>
<html>
<head>
<!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if necessary -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" />
<script>
$(document).ready(function(){
$('<div data-role="content" class="content"><ul data-role="listview" data-inset="true"><li><a href="#im?at=animals">test</a></li></ul></div>').appendTo("#home").page();
$.mobile.changePage("#home", {transition: "none"});
});
</script>
</head>
<body>
<div id="home" data-role="page">
</div>
</body>
</html>
在此先感谢。
你知道正确的jquery移动方法,触发它显示吗?我认为这就是changePage在转换none时所做的。 – Matrym 2011-12-26 09:46:12
我刚刚检查过'test'的祖先,看看为什么'test'是不可见的,发现其中一个(至少)有'display:none'。 – Minras 2011-12-26 09:49:03