I’ve found lots of examples setting scroll position, but they all seem to be when jumping between pages within a website.
Any advice on where to start given this scenario:
1) jqm page with links to pages on other sites (i.e. news stories)
2) you scroll down, click a news story, then click the back button
When returning, it would be great for the scroll position to be where it was when you left the page.
Any advice appreciated, thanks!
There are few solutions:
If you are building jQM mobile application (doesn’t meter android od iPhone) you can use phonegap to build mobile app out of jQM. Phonegap has an plugin called Child Browser and it can be used to display external links. This is relevan because jQm can have problems whit cashing while showing external pages.
Show it in iFrame, not an excellent idea but still manageable in some situations.
You can use default state and link your page to some external page, if the Ajax request is successful, the new page content is added to the DOM. But now we have a problem, sometimes, if last page had some non jQM plugins, they will not load properly. And another problem, unlike android there’s no back button on iPhone.
Option 1 is best for mobile devices, option 3 for desktop application.