Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Provides a cross browser way of letting you use the CSS3 transform property. Inspired by http://github.com/zachstronaut/jquery-css-transform
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
Source
Tests
README.md
package.yml

README.md

Element.Style.Transform

Provides a cross browser way of letting you use the CSS3 transform property. Inspired by http://github.com/zachstronaut/jquery-css-transform

Screenshot

ie support isn't there yet

As this post explains near the end: http://www.zachstronaut.com/posts/2009/02/22/jquery-patch-css-transform.html Using IEs matrix filter directly can make it possible to animate it. However the Matrix Filter is anything but easy to wrap your head around: http://msdn.microsoft.com/en-us/library/ms533014(VS.85).aspx So please be patient :)

How to Use

#JS
$('box').set('transform', 'scale(2)')
        .get('transform');           // Returns 'scale(2)'

$('box').setTransform('rotate(15deg)')
        .getTransform();              // Returns 'rotate(15deg)'

$('box').getStyle('transform'); unfortunately does not work. Neither does setStyle. I haven't found a way to extend those methods to make it work cross browser engine yet. So with those, you'll have to use the correct browser vendor prefixes.

#JS
$('box').getStyle('webkit-transform') // Safari and Chrome
        .getStyle('moz-transform')    // Firefox
        .getStyle('o-transform');      // Opera
Something went wrong with that request. Please try again.