A simple jQuery plugin for hardware-accelerated CSS transforms with graceful .animate() fallbacks
Now with Modernizr support! (Modernizr.css3dtransforms)
$(element).translateTo(x, y, duration);
x: 0,
y: 0,
duration: 300
.on('animationEnd');
$('#stage1 .box').on('click', function() {
$(this).translateTo(421, 156, 2666);
});
$('#stage2 .box')
.on('click', function() {
$(this).translateTo(-666, 202, 1420);
})
.on('animationEnd', function() {
$(this).text('Thanks!');
});
- Support for position: fixed elements is a little dodgy. Plays best with position: absolute or position: static elements.
- Go crazy!
Tweet me @markecarter if you have any questions or suggestions!