Lucy Posted May 8, 2015 Share Posted May 8, 2015 Does anyone know how you're supposed to write '-ms-filter' in Javascript in order to use it (like element.style.-ms-filter)? I've tried 'msFilter', and variations thereof. I've also tried writing it as a string, but that causes errors. Any ideas? Link to comment Share on other sites More sharing options...
dsonesuk Posted May 8, 2015 Share Posted May 8, 2015 In what is this 'filter' in relation too? opacity? Link to comment Share on other sites More sharing options...
Lucy Posted May 8, 2015 Author Share Posted May 8, 2015 I'm using it for opacity, yes (to support IE8). Link to comment Share on other sites More sharing options...
dsonesuk Posted May 8, 2015 Share Posted May 8, 2015 That's so old, the prefix '-ms-' was not used then, it should be .style.filter = "alpha(opacity=80)"; if i remember rightly. Link to comment Share on other sites More sharing options...
Lucy Posted May 8, 2015 Author Share Posted May 8, 2015 From what I've read, it was 'filter' in IE7 and changed to '-ms-filter' in IE8. Though, that said, my version of IE8 (on two computers, in fact) seems to work fine with just 'filter' :/ I wonder if there's any point in trying to put '-ms-filter' in... Link to comment Share on other sites More sharing options...
dsonesuk Posted May 8, 2015 Share Posted May 8, 2015 -ms-filter is mainly for css for IE8+, in standards mode apparentlyFor javascript -ms-filter is not used for the filter opacity but filter used for other effects including blur, which never gave a good result and sometimes problematic seehttp://stackoverflow.com/questions/6900647/ms-filter-vs-filter-whats-the-difference. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now