I have been struggling with this too.
Jeroen, check the DOM to see if it contains your page.
When you load the page directly (i.e. no Ajax), it loads the entire page, and you can use the multi-page.
When you fetch the page with Ajax, it only loads the first page of a multi-page-document.
Therefore, the other pages aren't in the dom, and are not found with the #hash.
Unfortunately, the jQuery.mobile.changePage does not warn you it has errors loading -- it just silently fails.
Two solutions:
- Use only single-pages
- When loading a multi-page document, add data-ajax="false" to prevent using AJAX.
Alternatively, you could have some serverside-logic: On an XmlHTTPRequest, output the right single page, and on a normal page load, output the multi-page-document.