Created
June 4, 2014 06:42
-
-
Save jaxxreal/85fb93ff8fae4756e842 to your computer and use it in GitHub Desktop.
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 addCSSRule(sheet, selector, rules, index) { | |
if(sheet.insertRule) { | |
sheet.insertRule(selector + "{" + rules + "}", index); | |
} | |
else { | |
sheet.addRule(selector, rules, index); | |
} | |
} | |
addCSSRule(document.styleSheets[0], "header", "float: left"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment