Created
September 23, 2015 21:47
-
-
Save yblee85/cd2519a88c7444e6aefa to your computer and use it in GitHub Desktop.
include CSS file / add new CSS
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 includeCSSfile(href) { | |
var head_node = document.head || document.getElementsByTagName('head')[0]; | |
var link_tag = document.createElement('link'); | |
link_tag.setAttribute('rel', 'stylesheet'); | |
link_tag.setAttribute('type', 'text/css'); | |
link_tag.setAttribute('href', href); | |
head_node.appendChild(link_tag); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment