Aximili
Aximili

Reputation: 29484

jQuery easing vs CSS3 transition - Is there an exact equivalent smoothing?

I am using jQuery animate together with CSS3 transition.

The problem is I couldn't find an equivalent smoothing animation. Is there any?

The closest I got is this (jQuery easeOutQuad and CSS3 default easing).

CSS:

#div1 { transition: width 0.5s; }

jQuery:

$('#div2').animate({'width': 200}, 500, 'easeOutQuad');

http://jsfiddle.net/bzw4q/

But they are still different.

I want both to animate together at the same time (using any good easing algorithm). Is that possible?

Upvotes: 6

Views: 2451

Answers (2)

msantoro12
msantoro12

Reputation: 126

Also here http://easings.net to get the matching cubic-bezier.

Upvotes: 0

Ussama Dahnin
Ussama Dahnin

Reputation: 61

Try with swing and ease-in-out > http://jsfiddle.net/et6Hg/

I think you have better chances :)

Upvotes: 2

Related Questions