richardstelmach richardstelmach -5 years ago 251
jQuery Question

Disable jQuery Mobile Loading Message and AJAX

I have the regular jQuery library attached and the jQuery mobile file attached after (

As soon as I attach jQuery mobile and refresh the page, I get the loading screen.

I have tried disabling it with:

$(document).on("mobileinit", function(){
$.mobile.loadingMessage = false;

As well as trying a different init function:


But neither have worked. I still just get the loading message or a completely blank screen.

The only function I really need it for is the swipe event.

Thanks in advance.

Answer Source

Mobileinit must be used before jQM js file is leaded, like this:

    <title>jQM Complex Demo</title>
    <meta name="viewport" content="width=device-width"/>
    <link rel="stylesheet" href="" />
    $(document).on("mobileinit", function(){
        $.mobile.loadingMessage = false;
    <script src=""></script>    

It won't work if you execute it after the script loads.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download