3

I am using cordova for mobile app development on android platform. I have this html code in www/index.html file:

 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Content-Language" content="en" />
    <script src="cordova-2.2.0.js" type="text/javascript"></script>
    <script src="jquery/jquery.js" type="text/javascript"></script>
    <script src="jquery.mobile/jquery.mobile-1.1.0.js" type="text/javascript"></script>
    <script src="JS/main.js" type="text/javascript"></script>
    <link rel="stylesheet" href="CSS/main.css"/>

</head>
    <body id="body" class="body">
        <div id="box" class="bodyBlack">
        </div>
    </body>
</html>

I don't know why but when I am running this app (also when just opening on pc browser) i am having this div appended at the bottom of the page:

<div ui-loader ui-corner-all ui-body-a ui-loader-default>
    <span ui-loader ui-corner-all ui-body-a ui-loader-default></span>
        <h1>loading</h1>

Here is the content of main.js:

$(document).ready(function(){
    $('#box').click(function(){
        if($(this).attr('class') == 'bodyBlack'){
            $(this).removeClass('bodyBlack');
            $(this).addClass('bodyWhite');
        }
        else{
            $(this).removeClass('bodyWhite');
            $(this).addClass('bodyBlack');
        }
    });
});

Why and from where dose it getting from? how I am preventing it to do so? Thanks!!!

1 Answer 1

3

This seems to be a "Loading Message" generated by jQuery Mobile, see this answer. So jQuery Mobile is loading something (and cant't find it, perhaps). Please post the content of your main.js file if you're still having trouble!

Sign up to request clarification or add additional context in comments.

3 Comments

the main.js is now part of the question
OK so it seems that jQuery Mobile is trying to load something by default. It's been a while since I have used it so I'm not sure what exactly it is, but that div is definitely generated by jQM!
I have found the solution on in the link you have given me

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.