Skip to content

Instantly share code, notes, and snippets.

@ksdSnippets
Created January 4, 2013 05:38
Show Gist options
  • Select an option

  • Save ksdSnippets/4450208 to your computer and use it in GitHub Desktop.

Select an option

Save ksdSnippets/4450208 to your computer and use it in GitHub Desktop.
JS: load 3rd party script
$.ajax({
url: '//third-party.com/resource.js',
dataType: 'script',
cache: true, // otherwise will get fresh copy every page load
success: function() {
// script loaded, do stuff!
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment