1

I face a problem when i try to use jqm in my website. A message of 'loading' appears on the bottom of my site. I figured out that it happens since I don't add jqm css. When I add the jqm css everything changes (color layout ect.). How is it possible to remove 'loading' message or add css without conflicts with the main css of my site?

<head>
<link href="css/site.css" rel="stylesheet"  />
<!--<link href="css/jquery.mobile-1.3.2.min.css" rel="stylesheet" /> -->
<!-- disable loading msg -->    
 <script>
   $(document).bind("mobileinit", function(){
   $.mobile.loadingMessage = false;
   });
 </script>

    <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js">     </script>
    <script src="scripts/jquery.mobile-1.3.2.min.js"></script>

</head>

I add script in my code. Nothing seems to happen! My problem solved only when i uncomment jqm css code, but then i got many conflicts with the site.css which i dont know how to solve.

Omar
  • 32,302
  • 9
  • 69
  • 112
Jose Ramon
  • 5,572
  • 25
  • 76
  • 152
  • check this answer http://stackoverflow.com/a/15276241/1771795 of how to disable ajax loading message – Omar Oct 29 '13 at 08:57
  • then you need to remove the div containing the loading message `$(".ui-loader").remove();`. – Omar Oct 29 '13 at 09:28
  • I ve alredy tried it. Nothing!! Same result with .hide(). – Jose Ramon Oct 29 '13 at 09:34
  • `.remove()` should remove it. anyway try add css structure http://ajax.aspnetcdn.com/ajax/jquery.mobile/1.3.2/jquery.mobile.structure-1.3.2.css – Omar Oct 29 '13 at 09:58
  • With the downloaded jqm css i got problems but with yours css it works fine!! Weird!! – Jose Ramon Oct 29 '13 at 10:04
  • this is a structure used for custom CSS created by themeroller. http://code.jquery.com/mobile/1.3.2/jquery.mobile.structure-1.3.2.min.css – Omar Oct 29 '13 at 10:05
  • btw, the way you used `mobileinit` is wrong. it should be loaded after jQuery and before jQuery Mobile in head. double check the answer I've given you in the first comment. – Omar Oct 29 '13 at 10:08
  • You re right, thanks Omar!! – Jose Ramon Oct 29 '13 at 10:13
  • possible duplicate of [jQuery Mobile - Loading Message](http://stackoverflow.com/questions/15275933/jquery-mobile-loading-message) – shanabus Oct 29 '13 at 14:18

1 Answers1

1

To disable jQuery Mobile loading message, you need to override global settings once mobileinit triggers. The code should be placed in head after loading jQuery and before loading jQuery Mobile libraries.

<head>
  <script src="jquery.js"></script>
  <script>
    $(document).on("mobileinit", function () {
      $.mobile.loadingMessage = false;
    });
  </script>
  <script src="jquery-mobile.js"></script>
</head>
Omar
  • 32,302
  • 9
  • 69
  • 112