lazyjinchuriki / cinephile

Movies and Shows finder site with HTML, CSS, Vanilla JS
https://lazyjinchuriki.github.io/cinephile/
22 stars 38 forks source link

Uncaught Reference Error #48

Open WeiJian123-tech opened 8 months ago

WeiJian123-tech commented 8 months ago

I found an error by right clicking inspect element while looking at index.html page. The error is as follows: Uncaught ReferenceError: ScrollTrigger is not defined at script1.js:442:1.

image

I viewed script1.js file on line 442 and found that this piece of code was causing the console to throw an Uncaught Reference Error:

ScrollTrigger.batch(".movie", {
  batchMax: 3, 
  onEnter: (batch) => {
    gsap.to(batch, {autoAlpha: 1, stagger: 0.15, overwrite: true})
  }, 
});

Your website cinephile works fine even with this Uncaught Reference Error. You can plug this line of code <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.9.1/ScrollTrigger.min.js"></script> in the html files to fix the issue however it comes with its own set of errors.

image

I can add the fix for you as a pull request for Hacktoberfest if you'd like.

lazyjinchuriki commented 8 months ago

Sure go for it. Remember that script should load before the script.js file otherwise it won't work.

WeiJian123-tech commented 8 months ago

Great, I'll make sure to load script before the script.js file and implement a fix soon.