I'm already using this fallback method for a CDN hosted copy of jQuery, but now I want to do the same for jqMobile, if possible.
They offer their CDN up in the getting started guide, so that's obviously step 1. But if I'm going to use a similar solution from the jQuery include, I've got to check for the existence of a variable. What can I check for to decide whether or not the CDN jqMobile include was successful?
<script type="text/javascript" src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"></script>
<script type="text/javascript">
if (typeof ?????? == 'undefined')
{
document.write(unescape("%3Cscript src='/path/to/your/jquery-mobile.js' type='text/javascript'%3E%3C/script%3E"));
}
</script>