Created
January 7, 2014 14:23
-
-
Save normansolutions/8300020 to your computer and use it in GitHub Desktop.
For use on blog post: http://www.normansolutions.co.uk/post/to-cms-or-not-to-cms
This file contains 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
//cdn fallback for Bootstrap css | |
<div id="bootstrapCssTest" class="hide"></div> // (HTML in _Layout.cshtml) | |
if ($('#bootstrapCssTest').is(':visible') === true) { | |
$('<link href="\css/bootstrap.min.css" rel="stylesheet" type="text/css" />').appendTo('head'); | |
} | |
//cdn fallback for Bootstrap js | |
if (typeof ($.fn.modal) === 'undefined') { | |
$('<script src="\scripts/bootstrap.min.js">\x3C/script>').appendTo('head'); | |
} | |
//cdn fallback for jQuery | |
<script>window.jQuery || document.write('<script src="\scripts/jQuery.min.js">\x3C/script>')</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment