Answer the question
In order to leave comments, you need to log in
A class is added on the scroll event, do I need to add a check for the presence of a class?
Hello! A class is added on the scroll event, is it necessary to add a check for the presence of a class so that the logic of adding it is disabled and does not work every scroll? I looked in the inspector at the moment of scrolling, it seems like there are no signs of class overwriting, but this is not accurate. How is it correct?
2. Is it normal practice to add multiple scroll handlers in different functions? It is not always convenient to shove functions into one handler.
Answer the question
In order to leave comments, you need to log in
On the scroll event, a class is added, whether it is necessary to add a check for the presence of a class so that the logic of adding it is disabled and does not work every scroll
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question