I'm using the Multi-page layout (Example), in my case the second page content is being generated by an AJAX call.
My problem is I have the AJAX call(s) to get the next/previous page and load the content (This is working), But some of the content is very long and the user will have to scroll to the top of the page to press/click the next/previous page button(s).
NOTE: I have the next/previous buttons on the top and the bottom of the page
What I would like is if the user clicks the next/previous button to set focus to the top of the page, so if the content page is very large it would start from the top instead of the user scrolling back to the top of the page.
Here is the example/question for my AJAX code
Another problem is in using JQM the anchor hashes <a href='#'
are used for page transitions
You probably want to bind to the event generated after $.mobile.changePage() and have it scroll to the top of the document.
$.mobile.silentScroll(0);
http://jquerymobile.com/test/docs/api/events.html#../../docs/api/methods.html