Created
March 24, 2015 17:32
-
-
Save jesusgoku/f88f4416497ef365724d to your computer and use it in GitHub Desktop.
Added JavaScript and CSS files to page
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 addScript(url) { | |
var head, script; | |
head = document.querySelector('head'); | |
script = document.createElement('script'); | |
script.type = 'text/javascript'; | |
script.src = url; head.appendChild(script); | |
}; | |
function addStylesheet(url) { | |
var head, link; | |
head = document.querySelector('head'); | |
link = document.createElement('link'); | |
link.type = 'text/css'; | |
link.rel = 'stylesheet'; | |
link.href = url; | |
head.appendChild(link); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment