user2449016
user2449016

Reputation: 169

Jquery mobile load external page and keep it

Im trying to load an external jquery mobile page into my main page with:

$.mobile.pageContainer.pagecontainer("load", "./pages/test1/test1.html", {});

and i want to keep it in the dom, even when im going back from that page.

Is there a way to do that? becouse when back key is presses, the page is removed from the html.

Upvotes: 0

Views: 126

Answers (1)

ezanker
ezanker

Reputation: 24738

Have you looked at setting data-dom-cache="true" on the page:

http://api.jquerymobile.com/page/#option-domCache

This will keep loaded pages in the DOM.

Upvotes: 1

Related Questions