首先jQM不需要document.ready()所以删除它。上布局事件
文档(UpdateLayout请)
直播示例:
JS:
$('#no_thanks').tap(function() {
$('#earn_more').slideUp(function() {
$(this).trigger('updatelayout');
});
});
HTML:
<div data-role="page" id="home" class="main_content">
<div data-theme="b" data-role="header" role="banner">
<h1 class="ui-title">My app</h1>
</div>
<div data-role="content">
<p class="app_notice" id="earn_more">
Tell us more about yourself
<a href="#" data-role="button" data-theme="d" data-icon="delete" data-iconpos="right" id="no_thanks">No thanks</a>
</p>
</div>
<div data-role="footer" data-theme="c" data-position="fixed" class="footer">
<div data-role="navbar">
<ul>
<li><a href="#" class="ui-btn-active">Home</a></li>
</ul>
</div>
</div>
</div>
您可以加入与http://jsfiddle.net/工作的例子吗? –
小提琴添加:http://jsfiddle.net/YZRj2/2/ – Ger