I'm using a static footer and a header. I set the contents of these using javascript. They're dynamic.
<body>
<div data-role="page" id="page">
<div data-role="header">
<h1>App name</h1>
</div><!-- /header -->
<div data-role="content" id="content">
<p>Loading...</p>
</div><!-- /content -->
<div data-role="footer" data-position="fixed">
<div data-role="navbar">
<ul>
<li><a href="#" id="menu1">Menu1</a></li>
<li><a href="#" id="menu2">Menu2</a></li>
<li><a href="#" id="menu3">Menu3</a></li>
</ul>
</div>
</div><!-- /footer -->
</div><!-- /page -->
</body>
I catch the click events on the menu items and I start out using $("#page").live('pageinit', mainMenu);
Then I'd like to change the $("#content")
html using the following:
$.mobile.changePage( "main-menu.html", { transition: "slideup" } );
This however changes the entire page. How do I set it to only change the contents of #content
?