Skip to content

Instantly share code, notes, and snippets.

@abbotto
Created March 5, 2012 20:28
Show Gist options
  • Save abbotto/1980886 to your computer and use it in GitHub Desktop.
Save abbotto/1980886 to your computer and use it in GitHub Desktop.
A Multi-Fallback Script Loader for jQuery
/* A Multi-Fallback Script Loader for jQuery
By Jared S. Abbott */
if(typeof($) != 'function' || 'undefined'==typeof jQuery){document.write(unescape("%3Cscript src='//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js' type='text/javascript'%3E%3C/script%3E"));}
else if(typeof($) != 'function' || 'undefined'==typeof jQuery){document.write(unescape("%3Cscript src='http://ajax.microsoft.com/ajax/jquery/jquery-1.7.1.min.js' type='text/javascript'%3E%3C/script%3E"));}
else if(typeof($) != 'function' || 'undefined'==typeof jQuery){document.write(unescape("%3Cscript src='js/libs/jquery-1.7.1.min.js' type='text/javascript'%3E%3C/script%3E"));}
@abbotto
Copy link
Author

abbotto commented Mar 5, 2012

“The value of a man resides in what he gives and not in what he is capable of receiving.”
~ Albert Einstein ~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment