Jump to content
Search Community

Help with dropdown

rgfx test
Moderator Tag

Go to solution Solved by Carl,

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Trying to create dropdown that will be used to generate categories, so I have no control over how many links will be placed. 


Was trying to store the height of each section, then make height 0 as I would like to start the dropdown in collapsed state. 


As you can see am way off, as soon I set height to 0 the data changes. No sure how to store the values, and then use them after. 


I tried my best, however not good enough, once again I must call upon the assistance of my homies. 


Please take a look. 

See the Pen KwXvpe by rgfx (@rgfx) on CodePen

Link to comment
Share on other sites

That's the pen on started from actually, I liked it cause it was simple. feels really nice.  However I need to have .toggle start at 0. Making things more complex.


Whats the point of having a drop-down if its going to start open anyway :)


Hope you get what I mean, thanks

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.
  • Create New...