Jump to content
GreenSock

The Old Designer

The new quickTo() function

Go to solution Solved by akapowl,

Recommended Posts

Firstly new poster and more a css/html person so I maybe being stupid here.. I have tried the codepen included which works fine... until the page is more than 100vh; 

 

Am I missing something really simple?

 

Sorry I just realised I should have provided an explanation, the mouse follower seems to dive down the page when scrolling past the page fold and appears again when above it.. 

See the Pen xxpbORN by GreenSock (@GreenSock) on CodePen

Link to comment
Share on other sites

  • Solution

Hello @The Old Designer - welcome to the forums.

 

Try changing pageX/pageY to clientX/clientY

 

https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/pageY

https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/clientY

 

Does that resolve things for you?

 

See the Pen eYyGwqG by akapowl (@akapowl) on CodePen

  • Like 3
Link to comment
Share on other sites

I updated the demo.

  • Like 4
Link to comment
Share on other sites

Thank you, much appreciated that works perfectly. 

Not easy to make the first post on a dev forum and thank you for the welcoming vibe there is here.

  • Like 3
Link to comment
Share on other sites

30 minutes ago, The Old Designer said:

Not easy to make the first post on a dev forum and thank you for the welcoming vibe there is here.

Indeed. A lot of forums make it feel risky to post because you may be criticized and made to feel dumb. We don't tolerate that vibe around here. There are no dumb questions! Your's was a good one and helped us spot a problem in the demo, so thanks! 🙌

  • Like 2
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.
×