is is possible to just disable the "error loading page" message in jQueryMobile? i have the following in my head and a) the message still shows up. b) the text isn't correct
<script>
$(document).bind("mobileinit", function(){
$.mobile.pageLoadErrorMessage = 'coming right up!';
});
$(document).bind("mobileinit", function(){
$.mobile.pageLoadErrorMessage = true;
});
</script>
By handling jQuery Mobile's 'mobileinit' event you can suppress the error message from displaying. To handle the 'mobileinit' event, create a file, custom-script.js like this:
$(document).bind("mobileinit", function(){
$.extend( $.mobile , {
pageLoadErrorMessage: ""
});
alert("mobileinit received");
});
Then reference the file BEFORE your jQuery Mobile script tag:
<script type='text/javascript' src='libs/jquery-1.8.3.js'></script>
<script type='text/javascript' src="js/custom-script.js"></script>
<script type='text/javascript' src="libs/jquery.mobile-1.2.0.min.js"></script>
That's all it takes to suppress the message.
You can hide it with css, like this:
div.ui-loader.ui-overlay-shadow { display: none !important; }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With