BennyTuner Posted April 1, 2021 Share Posted April 1, 2021 Hi, I get this error in the console - everything works though so not really bothered Uncaught TypeError: Cannot read property 'ownerDocument' of null at n (Flip.min.js:10) at Function.register (Flip.min.js:10) at _createPlugin (gsap.min.js:10) at gsap.min.js:10 at Array.forEach (<anonymous>) at Object.registerPlugin (gsap.min.js:10) at Flip.min.js:10 at Flip.min.js:10 at Flip.min.js:10 Link to comment Share on other sites More sharing options...
Rodrigo Posted April 1, 2021 Share Posted April 1, 2021 Hi, Can you extend a little bit about this, with just that information, personally I have no idea what could be the issue. I found something in the matrix helper in the source code but beyond that there is nothing I can think about. Please provide a bit more information (which other frameworks you're using, perhaps this could be a SSR issue) about the stack you're using in your development and if possible a reduced live sample in Codepen or Codesandbox. Happy Tweening!!! 3 Link to comment Share on other sites More sharing options...
BennyTuner Posted April 1, 2021 Author Share Posted April 1, 2021 go to https://www.stockphotography.co.uk/photos look in the console (Ctrl, shift + i --- you know that) and you will see it there Link to comment Share on other sites More sharing options...
GreenSock Posted April 1, 2021 Share Posted April 1, 2021 It looks like the problem is that you put all your JavaScript BEFORE the <body> tag, so when Flip tries to reference the body, it's undefined. I'd recommend putting your JS at the END of your <body>. 2 Link to comment Share on other sites More sharing options...
BennyTuner Posted April 1, 2021 Author Share Posted April 1, 2021 I don't think that's it - look at page source - all inline javascript is at the bottom, after the body tag - only script file src tags between <head> thats standard isn't it? no javascript anywhere else Link to comment Share on other sites More sharing options...
BennyTuner Posted April 1, 2021 Author Share Posted April 1, 2021 I tell a lie there is some javascript just above the body closing tag - but it is for the cart - gsap is outside - will have a look tomorrow and move it anyway Link to comment Share on other sites More sharing options...
GreenSock Posted April 1, 2021 Share Posted April 1, 2021 Yeah, sorry, what I meant was you're loading Flip above <body> and when it senses that GSAP has loaded, it will automatically try to run gsap.registerPlugin() on itself (as a convenience). That's the point at which it's trying to look for <body> and it doesn't exist. 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