rstacruz / jquery.transit

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

Flip and change back #55

Open noctivityinc opened 12 years ago

noctivityinc commented 12 years ago

Is it possible to flip a div and have a different div (or content) on the back?

vjpr commented 11 years ago

+1

daniel-steinmueller commented 11 years ago

I've solved this with a crossfade between two overlaying objects.

$('.object-1')
/* fade out and rotate 3 times */
.transition({ opacity: 0, perspective: 550, rotateX: 1080 }, $ani_duration_slow, $ani_easing );

$('.object-2')
/* fade in and rotate 3 times */
.transition({ opacity: 1, perspective: 550, rotateX: 1080 }, $ani_duration_slow, $ani_easing );