I am trying to change "transform" css property of element, using jQuery:
myBlock.css('-webkit-transform', 'rotate(' + angle + 'deg)');
myBlock.css('-moz-transform', 'rotate(' + angle + 'deg)');
myBlock.css('-ms-transform', 'rotate(' + angle + 'deg)');
myBlock.css('-o-transform', 'rotate(' + angle + 'deg)');
myBlock.css('transform', 'rotate(' + angle + 'deg)');
I want to see all of these properties applied to element, but the result is only
transform: rotate(45ged);
I tried JavaScript style, but it does not help too:
myBlock.style.WebkitTransform = "rotate(" + angle + "deg)";
Applied style is the same, as in previous example. I found information, that modern jQuery versions (from 1.8) remove prefixes automatically. But why JS-style removes vendor properties? To write all of these in one "attr('style', 'properties')" string is not a solution, because in this case it removes existing styles. So the question is: how to apply all transform properties, using JS or jQuery? Thanks for any help.
Edit: the goal is to have prefixed properties in saved html after executing JS command, not just to execute JS command and rotate div on angle's value.