Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

$.mobile.showPageLoadingMsg with custom message is failing

I'm applying the code from here: http://jquerymobile.com/demos/1.1.0-rc.1/docs/config/loadingMessageTextVisible.html

Which allows you to add a custom message to your Jquery Mobile loader.

My code is the following:

$.mobile.showPageLoadingMsg("a", "Loading New Chatom");

The problem is, this is assigning the CSS Class of ui-loader-default and not ui-loader-verbose which is needed to show correctly.

When I change my code to

$.mobile.showPageLoadingMsg("a", "Loading New Chatom", true);

It displays just fine. The true removes the animated loader, which is not what I want. Seems this might be a bug?

My project is done in coffeescript... though I doubt that's the issue at all.

like image 709
Gant Laborde Avatar asked Mar 05 '12 17:03

Gant Laborde


1 Answers

This is behaving as designed. In 1.1 you need to set $.mobile.loadingMessageTextVisible = true to show text in the loader:

$(document).bind("mobileinit", function(){
    $.mobile.loadingMessageTextVisible = true;
});

The documentation definitely needs to be improved on this feature. The page that describes the new loader options in detail was really just a test area, not a proper documentation page (that's why it's kind of hard to find).

like image 149
Jake Boone Avatar answered Oct 31 '22 21:10

Jake Boone