Skip to content

Instantly share code, notes, and snippets.

@renaudleo
Created February 15, 2013 14:43
Show Gist options
  • Save renaudleo/4960783 to your computer and use it in GitHub Desktop.
Save renaudleo/4960783 to your computer and use it in GitHub Desktop.
Check if jQuery is loaded
if (typeof jQuery == 'undefined') {
var script = document.createElement('script');
script.src = "http://path.to.jquery.js";
document.getElementsByTagName('head')[0].appendChild(script);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment