I get in trouble when calling the page using jquery mobile. In this example I assume if the index page (index.html) will call the data page(data.html) that will contain the data from my server. On my case, when I do the calling page from index.html using the syntax :
$.mobile.changePage("data.html");
And on page data.html I made this sintax :
$(document).on('pageinit', '#myDataPage', function(){
GetData();
});
function GetData(){
//Ajax Function here
}
After I call data.html apparently no data is displayed. But if I do it manually refresh the page turns data taken from my server successfully displayed. Is there something wrong with my code?