I’ve been searching for a way to remove the initial page container after jQuery mobile loaded the next page content via $.mobile.changePage(…)
What I’m experiencing is that this initial DIV element, created when the page is first shown will always remain on the page – and will only be hidden after calling $.mobile.changePage(…)
I need this initial page container to be removed instead, since some old data reside there that should be reset on first page change.
Anyone has a solution? Been searching the web for it but to no avail.
I have also tried to do $(‘#first-page’).remove() after I called $.mobile.changePage(…), but that will remove the initial page and make the new loaded page hidden!
EDIT: solved by clearing up the initial DIV using .html(“”)
You could just make next page load without ajax, this should remove the initial page.
data-ajax="false"Hope this helps!