Skip to content

Instantly share code, notes, and snippets.

@danheberden
Created November 11, 2011 21:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danheberden/1359257 to your computer and use it in GitHub Desktop.
Save danheberden/1359257 to your computer and use it in GitHub Desktop.
var verMatch = /jqversion=([\w\.]+)/.exec( location.search ),
version = verMatch && verMatch[1];
if ( version ) {
document.write( '<script src="//code.jquery.com/jquery-' + version + '.js"><\/script>' );
} else {
document.write( '<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"><\/script>' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment