Just a quick solution I did, do like this:
1. Wrap your data-role="header" and put the id=""constantheader-wrapper".
<header id="constantheader-wrapper">
<div data-role="header" data-id="theconstantheader" class="ui-header ui-bar-a" role="banner" data-position="fixed">
<h1 aria-level="1" role="heading" class="ui-title">Mobile sidor</h1>
</div>
</header>
Use div if want in the header wrapper, but try to have the full rendered header output like in this case, else it will loose the styling when you reload a page. NOTE! Put the header in your first page, then this method just add the header html to all the other pages.
2. Put the function in file or inline script
jQuery.fn.headerOnAllPages = function() {
var theHeader = $('#constantheader-wrapper').html();
var allPages = $('div[data-role="page"]');
for (var i = 1; i < allPages.length; i++) {
allPages[i].innerHTML = theHeader + allPages[i].innerHTML;
}
};
3. Call the function from document ready, for example:
$(document).ready(function() {
$().headerOnAllPages();
});
NOTE! This is just a quick fix if you want pure html solution.