2

Why is this: $("#bottom").css({"transform":"rotateX ("+rotation[0][0] + "deg)"}); not working?

rotation[0][0] is defined, and I can change any other propriety (background-color, for example) so how do I rotate an element along his X axis with Jquery? I'm using chrome, but I also tried with -webkit-transform.

1
  • inspect element does query add transform on inline or use webkit-transform instead transform Commented Nov 4, 2013 at 16:07

1 Answer 1

2

It's because you have a space between rotateX and the first open bracket.

Change "rotateX (":

$("#bottom").css({"transform":"rotateX ("+rotation[0][0] + "deg)"});

To "rotateX(":

$("#bottom").css({"transform":"rotateX("+rotation[0][0] + "deg)"});

JSFiddle demo.

Sign up to request clarification or add additional context in comments.

1 Comment

Oh, God. Can't believe it was something THAT stupid.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.