Jump to content
Search Community

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

code-salad

Go to solution Solved by joe_midi,

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Posted

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.

  • Solution
Posted

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"
});
Posted

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

Posted

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.

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.
×
×
  • Create New...