Wednesday, June 30th, 2010
Franz Enzenhofer has created a nice new webkitTransform plugin that helps you manage transforms and state.
Franz tells us more:
With jQuery.css you can’t easily change the webkitTransform CSS because webkitTransform is not your average CSS.
If in one step you add
.css('-webkit-transform', "rotate(20deg)")and in the next step
.css('-webkit-transform', "scale(2.0)")the rotate value gets reset, as you have rewritten the complete -webkit-transform CSS value.
Additionally you can’t just retrieve the ‘-webkit-transform’ css with .css(‘-webkit-transform’) as this just gives a matrix code.
Our goal with webkitTransform() was to fix this problem. With it, every element you assign webkit-transform css with can be edited in a simple way, without resetting every other -webkit-transform values.
Posted by Dion Almaer at 7:01 am