Jump to content
Search Community

Remove GSAP error from Console Log

Riyas Ahamed test
Moderator Tag

Recommended Posts

hi again Riyas

these error messages indicate that the specified selectors cannot be found by gsap so therefore cannot be processed.

eg if you are using the code suggested by zach earlier in your javascript then the html should have a corresponding element.

That is a reference to ".top" in your tween or trigger requires a class="top" somewhere in your html that can be resolved at runtime.


 
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Yes .top class only on HOME page. These error came from about us page ABout us page doesn't have .top element GSAP code in script.js that file will include all pages so how can i remove these error from about us page?

NOTE: I Need Animation only HOME Page  

Link to comment
Share on other sites

To be clear, they're warnings, not errors. To get rid of the warnings just make sure that the target exists before creating any tweens that use it.

 

But there's really not much reason to worry about loading from one script vs multiple. That was more important years ago but these days there's little to no difference AFAIK.

  • Thanks 1
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...