Dynamically create pages with jquery mobile and ajax'd json
I am looking to dynamically create pages with jquery mobile.
I've ajaxed in a bunch of post (via JSON) and displayed part of the post (post image & post title) on my main page.
When a users clicks on the title, I want to hide the main page and display the entire post content (html, images, etc) on it's on page.
When user hits a button, I want this new page to disappear and the main page to reappear.
What is the best approach here, using jquery mobile? What methods should I be using? Are their any codepen, jsfiddle examples out their?
This functionality is being incorporated into a phonegap app.
Thanks in advance all!