A
A
Antonio092020-04-28 23:36:22
JavaScript
Antonio09, 2020-04-28 23:36:22

How to show specific parts of a submenu in turn?

first, by clicking on the item with the text, the block will show level-one
and so that it can be hidden by the second click -

then by clicking on Other - show level-two
by the second click - hide level-two
https://jsfiddle.net/pn17a3m8/1 /

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2020-04-29
@Antonio09

$('.main-header__list').on('click', 'a', function(e) {
  e.preventDefault();
  $(this).next('.submenu').slideToggle();
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question