Contents tagged with getScript

  • Alternative to $.getScrip() in vanilla JS

    Tags: JS, getScript

    function getScript(url,success){

    var head = document.getElementsByTagName("head")[0], done = false;

    var script = document.createElement("script");

    script.src = url;

    // Attach handlers … more