Is it somehow possible to create something like a masterpage (asp.net) in jQuery Mobile?
I’m developing an mobile app (using phonegap if its important) and there I have the same header and footer (some buttons to navigate in the app) at all pages.
What I want to do is to create this footer just once… not in each div (page container).
Greetings
edit: thats the markup as I want it to be, but displayed is only page1 or page2 without header/footer
<div data-role="header">
<h1>Header</h1>
</div>
<div data-role="content">
<div data-role="page" id="page1" data-title="Page 1">
Page 1
</div>
<div data-role="page" id="page2" data-title="Page 2">
Page 2
</div>
</div>
<div data-role="footer" data-position="fixed">
<table>
<tr>
<td>
<a href="#page1">Page 1</a>
</td>
<td>
<a href="#page2">Page 2</a>
</td>
</tr>
</table>
</div>
After coming back to this problem I have decidet to use backbone.js. This is a javascript MVC framework.
For more informations see:
http://backbonejs.org/
http://backbonetutorials.com/
Also something I have found during my research:
http://kmalakoff.github.com/knockback/
Have not tried it yet, but it sounds very nice. This framework combines backbone.js and knockout.js (an MVVM framework) together.
Hope this helpes other peoples with the same problem!