We generally check if jQuery is loaded from CDN or not and fallback to local version if it didnt.
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/libs/jquery-1.7.1.min.js"><\/script>')</script>
I am using twitter bootstrap, and it loads the html 5 shim from the googlecode
copy.
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
Is there any way I can fallback to local version if it does not load from googlecode
Or am I doing something wrong. Shouldnt be I checking this ?
<script>window.html5 || document.write('<script src="js/libs/your-local-version.js"><\/script>')</script>
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