Skip to content

Instantly share code, notes, and snippets.

@tralston
Created March 21, 2015 13:44
Show Gist options
  • Save tralston/56bd60489c8621d1c535 to your computer and use it in GitHub Desktop.
Save tralston/56bd60489c8621d1c535 to your computer and use it in GitHub Desktop.
Load external script with a callback to wait for it
$.getScript("http://url/to/javascript.js", function () {
// Do something here. This will be safe to call after asynchronous script load
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment