Reputation: 4617
I've codes below:
HTML body codes:
<div>asbcakjscb<div>
CSS codes:
div {
width:400px;
height:400px;
background:red;
-ms-transform:scale(.3);
}
JavaScript codes:
document.quertSelector('div').style.msTransform = 'scale(1)';
The JavaScript codes are run on the page's load event. You can run code above at: http://jsfiddle.net/fakjX
I need to change CSS3 transform scale style from 0.3 to 1 on IE9. But I can't. I think this is a IE9's bug. The codes appears no problem.
Do you agree this is a IE9's bug? Or do you have any solutions to fix this problem?
Thank you.
Upvotes: 1
Views: 1306
Reputation: 43823
It's not a bug in IE, the dash notation is invalid when used in a script. You can use the camelCase equivalent and object notation when setting the property using jQuery.
Edit: Found another SO question on this subject - IE9: Why setting "-ms-transform" works from css, but not with jquery.css()
$('div').css({ msTransform: 'scale(1)' });
Upvotes: 2