S
S
Sergey2021-06-25 10:12:57
JavaScript
Sergey, 2021-06-25 10:12:57

Why does the handler fire several times after page resize?

Hi all! Actually there is a menu that is vertical on mobile screen sizes, and horizontal on desktop. When resizing the window, I add or remove a handler that collapses / expands the submenu on mobile screen sizes. But after resizing, this handler fires several times. Explain, please, why so? The code is here https://codepen.io/EptaScripter/pen/RwpdWeo

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question