これは changePage では不可能ですが、次のように content div に新しいコンテンツをロードすることができます:
<div data-role="page" id="main_page">
<div data-role="header">
<h1 id="page_title">My Title Here</h1>
</div>
<div data-role="content">
<div id="page_data">
<button id="changepage">ChangePage</button>
<h3>Some stuff</h3>
<input type="text" value="sometext" /><br />
<ul data-role="listview">
<li>Some other stuff</li>
</ul>
</div>
</div>
</div>
次に、ページを変更する場合:
$("#page_title").html("New page title!");
$("#page_data").html("<h3>my awesome markup</h3>"); // this could come from ajax'ing
$("#page_data").trigger('create');
タイトル バーにあるボタンはすべて非表示にして表示する必要があることに注意してください。複数のコンテンツ div を作成し$.animate
、 またはを使用して、新しいコンテンツを に移行でき$.fadeIn
ます。
編集: これは実際の例です: http://jsfiddle.net/Y9PVC/2/ (現在、fadeOut と fadeIn を使用)。