Jump to content
Search Community

Uncaught TypeError: Cannot read properties of null (reading 'getBoundingClientRect')

Rossmiester test
Moderator Tag

Recommended Posts

Hi I am using GreenSock on my WordPress website and getting the error "Uncaught TypeError: Cannot read properties of null (reading 'getBoundingClientRect')" - see image. 

 

GreenSock animations are working but this error happens when I add the ScrollTrigger js. I have searched the web for answers but have had no luck. Any help would be great. Thanks!

Screen Shot 2022-04-13 at 1.10.44 PM.png

Screen Shot 2022-04-13 at 1.11.49 PM.png

Link to comment
Share on other sites

Hi @Rossmiester. That doesn't look like it has anything to do with any GreenSock code. It's difficult to troubleshoot just by looking at the error message, but it looks like when that code executes, the document can't find any element with a "mysvg" class applied. If you still need some help with a GSAP-specific question, please provide a minimal demo and we'd be happy to take a peek. 

 

Good luck!

  • Like 1
Link to comment
Share on other sites

@GreenSock I am glad I reached out to you bc your answer solved my issue. I am such a bonehead. I am not sure why but that code I had was conflicting with the ScrollTrigger JS. I just deleted it and it works. Odd bc I don't remember ever adding the script to my project but oh well. Thanks. You can delete this thread. Thanks again :]

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