Jump to content
GreenSock

superbenj

Adjust parent height from absolute children

Recommended Posts

Is there a way with Gsap to adjust the parent height to fit the new requested section height and get the original height if the new section is closed?

See the Pen VwQeEZB by superbenj (@superbenj) on CodePen

Link to comment
Share on other sites

Hi superbeng,

 

I'm not exactly sure what you're asking. You can use gsap.getProperty to get the height of something and gsap.set to set the height.

  • Like 2
Link to comment
Share on other sites

Got it, thanks OSUblake

Link to comment
Share on other sites

Is there a way to update  ScrollSmoother onclick? 

because when we click on the second or third button, the footer is not visible?

The pen on the top is updated!

Link to comment
Share on other sites

Just call this to update it.

ScrollTrigger.refresh();

 

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