K
K
keche2017-09-02 12:14:24
css
keche, 2017-09-02 12:14:24

Why does slideToggle hide menu links on resolution change?

I started learning jQery, developing my own, adaptive menu and ran into a problem.
At a resolution of 744px, the menu adapts. The slideToggle function displays the menu and hides it correctly.
However, if you narrow the browser down to 744px or less, click on the menu to open it, then click on the menu again to hide it. And expand the browser to its normal state, more than 744px, then the menu links simply disappear.
But if you click on the menu to open it, at a resolution of 744px or less, and then expand the browser window again, the links are visible. Because they were not hidden back by the slideToggle function.
What could be the reason? Maybe CSS? I just can't figure out where the problem is.
Please help me find her.
Here is a link to an example
ubell.ru/menu

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim, 2017-09-02
@MaxGraph

And why not do it through toggleClass?
Well, either force to show links through css regardless of slideToggle.

U
Uwe_Boll, 2017-09-02
@Uwe_Boll

carefully read about callback and follow in the developer tools what jquery does and leaves behind

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question