Created
July 18, 2013 21:45
-
-
Save janvanderhaegen/6033407 to your computer and use it in GitHub Desktop.
Adds a check to see if JQuery mobile is supported, to the LightSwitch loading screen (default.html). This will catch most of the browsers that are unable to run LightSwich HTML apps (see note on http://janvanderhaegen.wordpress.com/2013/07/19/detect-if-the-browser-will-run-your-lightswitch-html-app/)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
$(document).ready(function () { | |
var supported = $.mobile.gradeA(); | |
if (!supported) { | |
$(".ui-icon-loading").hide(); | |
$(".ui-bottom-load").append('<div class="msls-header">This browser is not supported. Please upgrade to a more recent, <a href="http://jquerymobile.com/gbs/">supported</a> version.</div>'); | |
} else { | |
msls._run() | |
.then(null, function failure(error) { | |
alert(error); | |
}); | |
} | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment