Get CSS Rule w/ Selector
getRule: function(selector) { var mysheet = document.styleSheets[0]; var myrules = mysheet.cssRules ? mysheet.cssRules : mysheet.rules; for (i = 0; i < myrules.length; i++) if (myrules[i].selectorText.toLowerCase() == selector) return myrules[i]; return; }