Skip to content

Instantly share code, notes, and snippets.

@gcpantazis
Created November 9, 2011 19:28
Show Gist options
  • Save gcpantazis/1352640 to your computer and use it in GitHub Desktop.
Save gcpantazis/1352640 to your computer and use it in GitHub Desktop.
Animating CSS3 transforms (and other non-numerics) with jQuery.
$elem.animate({
'customScale': someScaleValue
}, {
step: function(now, fx){
if ( fx.prop == 'customScale' ) {
$elem.css({
'-webkit-transform': 'scale('+now+')'
});
}
}
}, 250);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment