Created
June 10, 2013 10:29
-
-
Save shinnn/5747814 to your computer and use it in GitHub Desktop.
Revisions
-
shinnn created this gist
Jun 10, 2013 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ mixin loadJQuery(version) script(src='https://ajax.googleapis.com/ajax/libs/jquery/#{version}/jquery.min.js') - var jQueryFallbacks = []; - jQueryFallbacks[0] = 'http://code.jquery.com/jquery-' + version + '.min.js'; - jQueryFallbacks[1] = 'http://ajax.aspnetcdn.com/ajax/jQuery/jquery-' + version + '.min.js'; - jQueryFallbacks[2] = 'js/jquery' + (version.charAt(0) === '1'? '1': '') +'.js'; each url in jQueryFallbacks script. window.jQuery || document.write('<script src=#{url}><\/script>'); //if lt IE 9 mixin loadJQuery('1.10.1') //if gte IE 9 <!--> mixin loadJQuery('2.0.2') <!--