Created
January 18, 2017 21:02
-
-
Save ihorduchenko/2b0d233f2152f7520470491b8f912800 to your computer and use it in GitHub Desktop.
Load stylesheets using Javascript
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
<!-- Load CSS --> | |
<script> | |
function loadCSS(hf) { | |
var ms = document.createElement("link"); | |
ms.rel = "stylesheet"; | |
ms.href = hf; | |
document.getElementsByTagName("head")[0].appendChild(ms); | |
} | |
loadCSS("css/fonts.css"); //User Styles: Fonts | |
loadCSS("css/style.css"); //User Styles: Main | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment