Answer the question
In order to leave comments, you need to log in
Why does the variable interfere first and then not?
It's just a popup list that has an active class added to it to pop up.
And for some reason, because of the callback, an error appeared due to which, on the first click, toggleClass fires 2 times and the list does not open, and in the next clicks everything normalizes and works well:
The callback itself looks like this:
the header_account_is_open variable changes its boolean value depending whether the element has an active class:
The problem is in this header_account_is_open variable, because when I delete the callback or the variable itself and where it is used, everything starts working well:
toggleClass is not dependent on this variable at all and I can’t understand why happening...
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question