I’ve got a list view, when a user taps, a changePage occurs to a loadingPage, when it’s done loading it switches to the article page with a changePage.
My problem: The loading is fine, however, I can’t seem to append the content to the article page’s div, I’m not that good on web programming but can it be so that the page doesn’t know about the div yet since it hasn’t loaded the page? The div remains null after an append.
this is how i append:
$("#tmpId").load(url + " article", function() {
$('#loadedPageContent').append($(tmpId + " article").html());
}
$.mobile.changePage("loadedArticle.html", {transition:"pop"});
To clarify: #tmpId is a div located in the loading page, #loadedPageContent is located on the final article page.
Put your
into
so that it will run after loadedArticle.html has finished loading.