Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

jQuery toggle menu - how to keep open?

I'm using toggle to show and hide the subnav in the sidebare. How can I make it so once you click on a project that the current studies menu stays open rather than closing once the next page loads?

1 Answer

One way would be to use a cookie to remember the state of the menu and have it load that state on the next page. It's a little more work as outlined but should help you accomplish this.

Thanks, I'll have a go at that :)