Answer the question
In order to leave comments, you need to log in
How to add menu toggle in jquery?
Good evening colleagues. Created a drop down menu. But I can not add switching between visible menus.
The menu is available: https://codepen.io/anon/pen/eVmeNx
I want to achieve:
If menu: Production 1 is visible, then menu: Production 2 is hidden. And vice versa. At the moment they are both revealed.
Answer the question
In order to leave comments, you need to log in
In short and without going into details, then specifically for your example, this option may be suitable. Replace JS code:
$('.subnav-button').click(function () {
$(this).next().slideToggle();
$(this).parent().siblings().children().next().slideUp();
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question