Unykvis Unykvis - 4 months ago 22
jQuery Question

How to animate CSS Translate

Is it possible to animate the CSS property translate via jquery?

$('.myButtons').animate({"transform":"translate(50px,100px)"})


and does it work in many browsers?

Demo not working: http://jsfiddle.net/ignaciocorreia/xWCVf/

UPDATE:

My solutions:


  1. Simple implementations - http://jsfiddle.net/ignaciocorreia/R3EaJ/

  2. Complex implementation and multi-browser - http://ricostacruz.com/jquery.transit/


Answer
$('div').css({"-webkit-transform":"translate(100px,100px)"});‚Äč

http://jsfiddle.net/xWCVf/5/