Just_Jack Posted June 29, 2020 Share Posted June 29, 2020 So I got this to work in codepen, but when I look locally, I get the error, "GSAP target #pulse2 not found. https://greensock.com". Why is that? See the Pen gOPGKNw by jkolze (@jkolze) on CodePen Link to comment Share on other sites More sharing options...
ZachSaucier Posted June 29, 2020 Share Posted June 29, 2020 Hey Jack. Evidently the element with an ID of pulse2 is not found on your local version. Maybe it's because of a typo, maybe you forgot to put it in the HTML. Without seeing it ourselves we can't say for sure. Link to comment Share on other sites More sharing options...
Pranay Nailwal Posted September 1, 2020 Share Posted September 1, 2020 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... }); 2 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now