Created
March 31, 2022 14:16
-
-
Save BrunoGiubilei/e9ba8a48c4511a7a665c2bd19333ed49 to your computer and use it in GitHub Desktop.
Load external script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function carregaJS(u, c) { | |
var d = document, t = 'script', | |
o = d.createElement(t), | |
s = d.getElementsByTagName(t)[0]; | |
o.src = u; | |
if (c) { o.addEventListener('load', function (e) { c(); }, false)} | |
s.parentNode.insertBefore(o, s); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment