Jaeeun Lee
Jaeeun Lee

Reputation: 3196

TweenMax Rotate, Opacity, and Scale

I'm trying to make the images on this page rotate, scale and change opacity all at the same time, like some images on this site do;

http://soyouwanttogotorisd.com/

And this is my site;

http://www.ducklingfarm.com

I'm using TweenMax, and this is my code;

$(document).ready(function() {
    TweenMax.from( $('#homeImg'), .5, 
    {css:{scale:.05, opacity:0, rotation: 180}, ease:Quad.easeInOut}), 400,-400);
 });

But nothing's happening...

Please help me!

Thanks!

Upvotes: 2

Views: 27979

Answers (1)

Jaeeun Lee
Jaeeun Lee

Reputation: 3196

Found an answer!

http://forums.greensock.com/topic/8480-scale-rotate-and-opacity/#entry33133

I used this code;

$(window).load (function(){
  TweenMax.from( $('.homeImg > img'), 0.5,
        {css:{scale:0.05, opacity:0, rotation: 180}, 
        ease:Quad.easeInOut
  });
});

Upvotes: 8

Related Questions