Created
September 26, 2011 11:17
-
-
Save fnando/1242030 to your computer and use it in GitHub Desktop.
Conditionally include jQuery from different sources.
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" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> | |
<script type="text/javascript"> | |
if (typeof jQuery === "undefined") { | |
document.write(unescape("%3Cscript src='#{local_path}' type='text/javascript'%3E%3C/script%3E")); | |
}; | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment