Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
KatuBryda

Animation bug - could anyone check out my code

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

Thank you for answer, I made this changes but still doesn't work.. 

Link to comment
Share on other sites

Can anyone know where the problem is? I would be very grateful!

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

 

https://github.com/katubrd/page-transition (with Sahil amendments).

Link to comment
Share on other sites

You made only one change from what I had suggested, and you changed all 'TweenLite' to 'Tweenlite'.

 

  1. Write TweenLite on line 19, 32, 47, 61.
  2. Correct the typo on line 86 as list.length

 

 

 

  • Like 2
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

I'm not seeing that error, but there is now a typo on line 85. 

 

//switch this
el.classlist.remove(n);

//to this
el.classList.remove(n);

 

Here is your code with that correction. 

 

See the Pen bLZJXe by PointC (@PointC) on CodePen

 

Happy tweening.

:)

 

  • Like 4
Link to comment
Share on other sites

Thank you so much! I alway have problems with seeing missing letters or other small mistakes. Thank you once again!

  • Like 1
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.
×