rstacruz / jquery.transit

Super-smooth CSS3 transformations and transitions for jQuery
http://ricostacruz.com/jquery.transit
7.29k stars 863 forks source link

Uncaught TypeError: Object none has no method 'setFromString' #69

Closed heaversm closed 11 years ago

heaversm commented 12 years ago

Hi - I'm using this code:

$s2_book.delay(250).transition({ rotate: '30deg' },1250);

and getting this error in the javascript console:

Uncaught TypeError: Object none has no method 'setFromString' 
docluv commented 12 years ago

I am too, in several browsers.

I think it is due to a change in the way the jQuery css method works. It is returning "none" if the property does not exist. I changed things to the following line:

    var t = $(elem).css('transform') || new Transform();
    t = t !== "none" ? t : new Transform();

And got things working

Maxence commented 12 years ago

Thanks, it works like a charm

Edit: I still got this message if my element got a css transform property.

#content {
-webkit-transform: rotate(-60deg) translate(3000px, 0px) rotateX(0deg);
}
$('#content').css('-webkit-transform','rotate(-60deg) translate(3000px, 0px) rotateX(0deg)');

Uncaught TypeError: Object matrix(0.5000000000000001, -0.8660254037844386, 0.8660254037844386, 0.5000000000000001, 1500.0000000000002, -2598.076211353316) has no method 'setFromString'

Using jQuery 1.8(.1) with 1.7.0 it works without any fix.

Maxence commented 12 years ago

This fix, solved my problem: https://github.com/cheald/jquery.transit/commit/b4684ae2343a81df1853c4c5600192bc0989a9a1

yvesvanbroekhoven commented 11 years ago

Thx @Maxence

rstacruz commented 11 years ago

Fixed in 0.9.9.