Created
April 2, 2015 17:57
-
-
Save fredryk/4503261dc0e6dc057b7f to your computer and use it in GitHub Desktop.
Load jQuery conditionally
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" charset="utf-8"> | |
| //<![CDATA[ | |
| // Including jQuery conditionnally. | |
| if (typeof jQuery === 'undefined') { | |
| document.write({{ "http://ajax.googleapis.com/ajax/libs/jquery/1.9/jquery.min.js" | script_tag | json }}); | |
| document.write('<script type="text/javascript">jQuery.noConflict();<\/script>'); | |
| } | |
| //]]> | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment