Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
code-salad

JS stupid I am. Couldn't get the first lesson to work.

Recommended Posts

I'm thinking GreenSock is a great thing, because I don't know JS.  I watched the "Getting Started with GSAP" video and tried something like the first example, making a logo transition to the left: property in my css.

 

​This is embarrassing but I can't make it work. Can anyone help?

 

 

See the Pen doEPPL by code-salad (@code-salad) on CodePen

Link to comment
Share on other sites

From your codepen, you need to put the value in parenthesis:

 

so left:"180px" and not left: 180 px

TweenMax.to(".logo", 4, {
  left:"180px"
});
Link to comment
Share on other sites

That was fast!  Thank you for pointing out what should have been obvious to me.  The eyes are so easily tricked by the brain.

Link to comment
Share on other sites

No worries, these things happen! I was wondering why my code wasn't work for 20 minutes yesterday before I realised I was missing an S.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×