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...
});
GSAP target not found error.
in GSAP
Posted
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