Skip to content

Instantly share code, notes, and snippets.

@svieira
Forked from remy/stylesheet-injector.js
Created November 5, 2010 13:35
Show Gist options
  • Save svieira/664169 to your computer and use it in GitHub Desktop.
Save svieira/664169 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');
link.rel = 'stylesheet',
head = document.getElementsByTagName('head')[0],
tmp;
for(; i < css.length; i++){
tmp = link.cloneNode();
tmp.href = css[i];
head.appendChild(link);
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment