Reputation: 9378
I have a jquerymobile application, some pages are heavy loading ajax network calls so I would like to show a dialog. I have it set up to but it very shows for some reason. So it looks like the page is just empty and not doing any work. Should I do my call on the pageinit function or pageshow? Thanks for any help.
$('#MyAlbums').live('pagebeforeshow', function (event) {
$.mobile.showPageLoadingMsg();
var myselect = $("select#select-choice-1");
myselect[0].selectedIndex = 0;
myselect.selectmenu("refresh");
GetMyAlbumInformation('full');
});
Upvotes: 0
Views: 69
Reputation: 50767
$(document).bind('mobileinit', function(){
$('#MyAlbums').live('pagebeforeshow', function (event) {
$.mobile.loadingMessage= ' The message I want to display ';
$.mobile.showPageLoadingMsg();
var myselect = $("select#select-choice-1");
myselect[0].selectedIndex = 0;
myselect.selectmenu("refresh");
GetMyAlbumInformation('full');
});
});
Upvotes: 1