function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
raj345raj345 

Jquery mobile: Loading Message

I am developing a mobile application using Jquery Mobile. When there is no loader, the app is working fine. But after adding loader in the app, when I change from page 1 to page 2, first it changes from page 1 to page 2, again it comes back to page 1 and then changes to page 2 and finally, load all the contents in the page 2.

When there is no loader, when I change from page 1 to page 2, it changes from page 1 to page 2 and loads the page 2 contents instantly. Why it is not working like same when I add to loader to it. Code for loader I am using is 

 

                $j(‘#body’).addClass(‘ui-loading’);  
                $j(‘#body’).removeClass(‘ui-loading’); 
CSS:

               .ui-loader{
                 width:44px;
                 height:44px;
                 color:black;
                 box-shadow:none;
                 background-color:white;
                 background:url('img/loader.gif') no-repeat;
                 border:none;
                 position:absolute;
                 left:50%;
                 margin-left:-48px;
                 margin-top:-44px; 
                 background-position:center;}

 Help will be appreciated. Thanks in advance.

JarrettKuljisJarrettKuljis

Have you tried using the built in method for displaying the page loading class?

 

$j.mobile.showPageLoadingMsg();

 

raj345raj345

 

Yes, I have tried but still its not working. 

Gaurav KheterpalGaurav Kheterpal

I think you have a binding problem. This is purely a jQuery Mobile problem and has nothing to do with Visualforce or Salesforce.

 

See this link - http://stackoverflow.com/questions/9000221/jquery-mobile-page-transition-problems

 

If you get the binding right, it should be fixed. I hope this helps.

 

Regards,
Gaurav