I recently implemented a toggle-menu feature, which you can see in action on this demo.
To enhance the toggle-menu, I added a CSS transition effect to div.nav-menu
, utilizing max-height:0;
and increasing it to max-height:480px;
.
However, after clicking the menu toggle to reveal the menu, the transition works perfectly. Yet, upon clicking the toggle to hide the menu again, the transition fails to work.
I'm puzzled as to what might be causing this issue. Any insight would be greatly appreciated!