Skip to content

Instantly share code, notes, and snippets.

@pbojinov
Created May 23, 2013 04:47
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 pbojinov/5632798 to your computer and use it in GitHub Desktop.
Save pbojinov/5632798 to your computer and use it in GitHub Desktop.
//Able to load a JS file
$.loadJS = function (src) {
var s = document.createElement('script')
s.type = 'text/javascript'
s.async = true
s.src = src
var x = document.getElementsByTagName('script')[0]
x.parentNode.insertBefore(s, x)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment