I had some time to mess around with this and I've found a solution that works (tested).
SOME NOTES:
the javascript encapsulated in $(document).ready(); is for dynamically creating a page if the user navigates to your index.html file with a hash mark already appended (i.e. index.html#some_hash_mark).
The function, create_page(page_id) is for creating a page from a link (or programatically if you like).
Note that the jquery core script and the jquery mobile css are loaded before the $(document).ready() statement but that the jquery mobile script is loaded after.
See that the body tag has been given an id that is refrenced when appending pages to it.