javascript - "LOADING" massage generated at the bottom of the page in JQM -
this question has reply here:
jquery mobile loading message 10 answersi building basic jqm page , @ end of page getting big tag text "loading". have seen lot of answers no 1 working me. have html code:
<!doctype html> <html> <head> <title>stackmob js sdk examples</title> <link href="css/bootstrap.css" rel="stylesheet" type="text/css"> <script type="text/javascript" src="cordova-1.9.0.js"></script> <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="js/jquery_migrate.js"></script> <script type="text/javascript" src="js/jquery_mobile.js"></script> <script type="text/javascript" src="js/main.js"></script> <script type="text/javascript" src="http://static.stackmob.com/js/stackmob-js-0.7.0-bundled-min.js"></script> <script type="text/javascript"> $(window).load(function(){ $.mobile.hidepageloadingmsg(); }); </script> </head> <body> <div data-role="page"> <div data-role="header">...</div> <input type="button" value="bbbb" id="bb"> <div data-role="content">...</div> <div data-role="footer">...</div> </body> </html>
and in main.js file:
$(window).load(function(){ $.mobile.hidepageloadingmsg(); }); jquery('document').ready(function() { $.mobile.hidepageloadingmsg(); jquery('#bb').click(function(){ $.mobile.hidepageloadingmsg(); }); });
nothing working! thanks!
you need during mobileinit event, this:
<script type="text/javascript"> $(document).bind('mobileinit',function(){ $.mobile.loadingmessage = false; }) </script>
one more thing, must done before jquery mobile loaded, this:
<head> <title>jqm complex demo</title> <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0"/> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" /> <script type="text/javascript"> $(document).bind('mobileinit',function(){ $.mobile.loadingmessage = false; }) </script> <script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script> </head>
here's jsfiddle example: http://jsfiddle.net/gajotres/rwrx9/
more can found here: http://jquerymobile.com/demos/1.1.0/docs/api/globalconfig.html
javascript jquery html5 jquery-mobile
No comments:
Post a Comment