B
B
Bronaz772019-06-13 19:58:06
User navigation
Bronaz77, 2019-06-13 19:58:06

How to make a mobile menu for a site similar to wildberries?

There is a mobile version of the site (local), you need to make it so that when you click on a category, the subcategory of the menu comes out and only after selecting the subcategory of users does it go to the desired part of the site directory. I really like the implementation on the mobile version https://www.wildberries.ru/. Please tell me how to implement something like this? What js script is suitable for such an implementation?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
ma4t, 2019-06-13
@Bronaz77

here, not so much JS is needed as layout.
Layout the subcategory as you need it, how it should look after the click has occurred.
And then hide it with display:none;
When you click on a category, display: block (flex, etc. / select the one you need) is set.
When you click on the cross, the block with the subcategory is again set to display: none;
At least that's how I see it on the wilberry, it's not confused with them. Without any transforms (well, or my old browser is so robbed)
I.e. you just need to hang a click event on the button you need
If you use jquery read here
www.wisdomweb.ru/JQ/cssmanip.php
ps so I understand you asked this

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question