[CSS3 Animation and transforms] CSS properties in JavaScript

Hello,

I am wanting to test FF12.0a2 (Aurora) for various CSS3 animation and 
transforms but some of this testing requires CSS properties in JavaScript.

What do I need to do to the below script to allow for MozProperty that 
works together with WebkitProperty?


<script type="text/javascript">

function left()
{
document.getElementById('elem1').style.WebkitTransform="rotateY(90deg)";
document.getElementById('elem2').style.background="blue";
}

</script>


The below code does not work for either WebKit or Gecko (which I did 
expect).

<script type="text/javascript">

function left()
{
document.getElementById('elem1').style.WebkitTransform="rotateY(90deg)";
document.getElementById('elem1').style.MozTransform="rotateY(90deg)";
document.getElementById('elem2').style.background="blue";
}

</script>


-- 
Alan Gresley
http://css-3d.org/
http://css-class.com/

Received on Friday, 24 February 2012 05:58:18 UTC