Jump to content
Search Community

GSAP target not found error.

Just_Jack test
Moderator Tag

Recommended Posts

  • 2 months later...

Hey Jack, I was facing the same issue, but then I realised something. What if I manually run the script form the browser using source>snippets? Well I tried that and it worked.

So the underlying problem(for me) was that the DOM content was not completely loaded (for some reason) before my javascript script. So what I needed to do was wait for DOM and then run my script.
You can try this solution
 

document.addEventListener("DOMContentLoaded", function(event){
gsap.set("svg", { visibility: "visible" });
//rest of your script...
});

 

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