Jump to content
GreenSock

rhineland

Conflict(?) between ScrollTrigger pinned section & MenuSpy

Moderator Tag
Go to solution Solved by GreenSock,

Recommended Posts

Hi there GreenSock community,

First time working with GSAP so I hope you'll forgive any sloppiness on my part.

 

The issue is that, as I scroll, the menu is updating sooner than it should. Again, I'm assuming that this is because I have moved things -315px during my animation, but am not sure how to correct this. Any advice would be so appreciated.

 

A stripped down/clunky version of this is at the CodePen link. And/or you can see the 'actual' staging front-end at http://endera.ctclients.ca/.

 

Thank you.

See the Pen zYzEGZj by scallemang (@scallemang) on CodePen

Link to comment
Share on other sites

Hi there Rhineland,

This is quite a lot of code to look through - the CSS is minified too so it's really hard to tell what the issue might be.

Could you strip this down to a reduced test case for us?

Stripping things back is a really good way to debug and usually solves the issue.

If you don't find the issue after reducing the pen down we'll be happy to take a look at the reduced codepen and advise you on a different approach.

  • Like 1
Link to comment
Share on other sites

Thank you for your patience, @Cassie. I've stripped it down, hopefully enough to be usable. Updated link above, or below as well – you might ask why the negative margin on the neighbouring div. Before I did that I was getting a big white space because of my transforms, seen at the very end of this screen capture (though for all I know there's a better way to solve that too): 

See the Pen zYzEGZj by scallemang (@scallemang) on CodePen

.

  • Like 1
Link to comment
Share on other sites

  • Solution

Yeah, that's an issue with MenuSpy. Obviously we can't fix that because we didn't author that tool (I've never even heard of it before today). But you could duplicate that functionality just by using ScrollTrigger: 

See the Pen XWgzLgx?editors=0010 by GreenSock (@GreenSock) on CodePen

 

Does that help? 

  • Like 2
Link to comment
Share on other sites

@GreenSock That helps a tremendous amount, thank you. I hadn't heard of this library previously either, but Google led me to it before to ScrollTrigger... Thank you for illuminating that I don't need it at all and can just use gsap. Very best wishes.

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