Jump to content
Search Community

Animation not working?

Cowdar test
Moderator Tag

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

First of all I'm a Noob 

I got this animation

 tl.staggerTo(Shows, 0.2, {  css:{color:"#EEEE"}, left:"10px" }, 0.1);

 

The colour changes but there's no movement 

and if I delete the css then the movement work.

but I cant seem to get them to animate together?

 

any help would be great :) 

Link to comment
Share on other sites

Hi and welcome to the GreenSock forums.

 

The issue is that all CSS properties need to be wrapped in the css:{} object. In your code left is outside the object, therefore is not being dispatched to the CSS Plugin. Try this:

tl.staggerTo(Shows, 0.2, {  css:{color:"#EEEE", left:"10px"} }, 0.1);

// this will have the exact effect since the css:{} object is optional
tl.staggerTo(Shows, 0.2, { color:"#EEEE", left:"10px" }, 0.1);

Also check that the elements you're animating have a position set, whether absolute, relative or fixed, otherwise GSAP instances that animate position properties won't work.

 

Finally for the next time please read this post so you can learn how to create a live reduced sample, which always helps identify and solving issues faster:

 

http://forums.greensock.com/topic/9002-read-this-first-how-to-create-a-codepen-demo/

 

Rodrigo.

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