Jump to content
Search Community

Animation bug - could anyone check out my code

KatuBryda 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

You had multiple mistakes,

  1. TweenLite was written as Tweenlite
  2. Both functions were defined as MoveToRight
  3. and typo in list.length as list.lenght

Usually these errors can be debugged using developer console. Also, we prefer to get a reduced Codepen demo instead of live sites or git repos. It becomes time consuming to analyze code, reconstruct demos etc

 

See the Pen YegBEX?editors=0010 by Sahil89 (@Sahil89) on CodePen

 

  • Like 6
Link to comment
Share on other sites

I'm still seeing those errors @Sahil listed for you. Once you fix those it should work just fine.

 

13 minutes ago, KatuBryda said:

I understand that it is easier to check the code on codepen but such problems arise when I write the code outside ..

 

It might be easier to create a small demo on CodePen and once you know it's working properly you simply export it. If your local code isn't working correctly you would then have a reference from the CodePen demo so you can compare and find the difference.

 

eVsUlIN.jpg 

 

Happy tweening.

:)

 

  • Like 3
Link to comment
Share on other sites

For simple issues such as this, which take a disproportionate amount of time to fix for people who didn't write the code, it can be a good idea to use tools like jslint.com or jshint.com, or any other JS validator, which can help you find the problem yourself. :) 

  • Like 3
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...