rollOrDie Posted December 29, 2008 Share Posted December 29, 2008 Im trying to create a script that will edit css rules in both FF and IE, but IE just isn't having any of it! I get an error message saying that 'the object doesn't support this property or method'. Here is my code, can anybody help? var styleSheet = document.styleSheets[1]; if (styleSheet.rules) { var pAbout1 = styleSheet.rules[20].style; var pAbout2 = styleSheet.rules[22].style; var pAbout3 = styleSheet.rules[23].style; } else { var pAbout1 = styleSheet.cssRules[20].style; var pAbout2 = styleSheet.cssRules[22].style; var pAbout3 = styleSheet.cssRules[23].style; } pAbout2.setProperty ('display', 'none', ''); pAbout3.setProperty ('display', 'none', ''); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.