Hi;
I am trying to show a "wait" messaje before doing $.post operations that can take several seconds. Before I tried to use the loading spinner, but always with same results: only BlackBerry browsers and desktop Firefox shows the spinner and/or my alternative wait message. All other phone and desktop browsers not (i.e. with Galaxy II, Galaxy III, iPhone5, and in desktop Chrome, and IE it does not work). What I do is to show a div in this way:
$(document).bind("mobileinit", function(){
$.mobile.defaultTransition = 'none';
$(document).ajaxStart(function() {
$('#msgPanel').html('<center>wait...</center>').trigger('create');
$('#msgPanel').show();
});
$(document).ajaxStop(function() {
$('#msgPanel').html('').trigger('create');
$('#msgPanel').hide();
});
});
Only BlackBerry shows me the "wait..."; all others shows nothing in the waiting time. I also tried:
$(document).bind("mobileinit", function(){
$.mobile.defaultTransition = 'none';
$(document).ajaxStart(function() {
$.mobile.loading('show');
});
$(document).ajaxStop(function() {
$.mobile.loading('hide');
});
});
... same results.
In all the cases, the loading(´show´) is executed, the problem is that the spinner box does not appear during the $.post operation, but it appears after it (I know because I tried removing the ajaxStop event).
Is there any clue for showing the spinner and/or my wait message in all the cases?.
Thank you!.
Adriano