I use a server-side framework to generate a jQuery Mobile multi-page with several sub-pages. The framework allows server-side handling of JS-events and the server-side event handler can "rewrite" the content of individual HTML elements.
I could have a <div id="myId"><ul data-role="listview">...</ul></div> and from the server-side replace the div content with something else. On the browser side the replacement HTML fragment is parsed and the DOM tree is adjusted.
I am an absolute jQuery Mobile beginner. I have a multi-page with several internal pages. I understand how buttons and anchors on one page can point a a different page. However, in my situation when a user presses a button on, say, page1 I want to dynamically decide if he should go to page2, page3 or page4, based on whatever other input the user has provided on page1.