Jump to content
GreenSock

Umberto

Problem with smoother.paused and Draggable

Recommended Posts

Hi, I'm trying to solve 2 problems with smoother.paused

 

"Uncaught TypeError: Cannot read properties of undefined (reading 'paused')"

 and Draggable Slider 

 

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

 

Thanks for the help

See the Pen NWBwoya by umberto (@umberto) on CodePen

Link to comment
Share on other sites

Those look like just JavaScript problems, unrelated to anything with GSAP. 

 

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

That's because you defined container as document.querySelector(".js-experience-slider") but there is no such element. 

const proxy = container.querySelector(".proxy");

 

  • Like 1
Link to comment
Share on other sites

Hi, thanks for the reply.
In both cases I could not find a solution.

With Draggable I tried to make changes to the code but now I have a new problem:

 

Uncaught TypeError: Cannot read properties of undefined (reading 'offsetWidth')

 

See the Pen jOpvqPv by umberto (@umberto) on CodePen


With ScollSmoother paused I don't know what to do.

 

Thank you for your time

Link to comment
Share on other sites

Hi,

 

This is exactly the same error Jack already pointed out:

const slides = document.querySelectorAll(".js-experience-slide");
console.log(slides); // <- Returns an empty node list

So this is undefined:

slides[0] // Undefined!!

Please solve and work your JS/Logic issues since they are not GSAP related.

 

Happy Tweening!

  • Like 1
Link to comment
Share on other sites

Sorry, I thought it was a gsap problem.

I will try to fix everything.

 

Thank you

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