CSS not working fine in IE9 but it works fine in all other versions [closed]
i am using jquery addRule but it is not working fine in IE9 how i can resolve this issue. any help please
check this code
var ss=document.createStyleSheet();
ss.insertRule("v\\:shape", "behavior:url(#default#VML);")
jQuery does not have an .addRule()
method. Only >IE9 supports the addRule
method.
You should be using insertRule
instead.
Edit: In fact, you should check for both as IE8 and below do not support insertRule
:
if (stylesheet.insertRule) {
// all except IE < 9
} else if (stylesheet.addRule) {
// IE < 9
}
Assuming stylesheet
is your stylesheet object.
精彩评论