jquery/jquery-mobile — Issue #3552: showPageLoadingMsg not displaying
Author: benjaminthatcher
Created: 2012-02-09 00:51:38+00:00
State: open

I'm currently writing a PhoneGap/jQuery Mobile app for Android. The issue I'm getting is that I'm only able to get the showPageLoadingMsg function to work if I insert **display: "block"** as shown below in the jquery.mobile-1.0.1.js file. I'm not sure what is causing this issue - I've tested the app in Chrome (without PhoneGap) and on the Android Emulator (with PhoneGap). As tested, the app was using jQM 1.0.1, jQuery 1.6.4 and PhoneGap 1.4.0.

```javascript
// turn on/off page loading message.
showPageLoadingMsg: function() {
if ( $.mobile.loadingMessage ) {
var activeBtn = $( "." + $.mobile.activeBtnClass ).first();

$loader
.find( "h1" )
.text( $.mobile.loadingMessage )
.end()
.appendTo( $.mobile.pageContainer )
// position at y center (if scrollTop supported), above the activeBtn (if defined), or just 100px from top
.css({
display: "block", // I have to add this line just to get the loading message to display
top: $.support.scrollTop && $window.scrollTop() + $window.height() / 2 ||
activeBtn.length && activeBtn.offset().top || 100
});
}
$html.addClass( "ui-loading" );
}
```

I came across this similar issue on stackoverflow when I was trying to find a solution for this issue:
http://stackoverflow.com/questions/7420023/jquery-mobile-problems-getting-showpageloadingmsg-to-work-with-pagebeforeshow