Skip to content

Instantly share code, notes, and snippets.

@martinkr
Forked from necolas/stylesheet-injector.js
Created January 14, 2014 09:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save martinkr/8415484 to your computer and use it in GitHub Desktop.
Save martinkr/8415484 to your computer and use it in GitHub Desktop.
(function() {
var css = [
'/css/default.css',
'/css/section.css',
'/css/custom.css'
],
i = 0,
link = document.createElement('link'),
head = document.getElementsByTagName('head')[0],
tmp;
link.rel = 'stylesheet';
for(; i < css.length; i++){
tmp = link.cloneNode(true);
tmp.href = css[i];
head.appendChild(tmp);
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment