The question is so nonstandard ... For a large detailed reason, I came to the conclusion that in order to designate styles, I need to pin a certain class on the body . For this, I made the following load hierarchy:

 <body> <script src="/assets/js/logic.min.js"></script> 

And logic.min.js itself logic.min.js like this:

 if (window.location.pathname == '/') $('body').addClass('hellopage').css('visibility', 'visible'); else if (~window.location.pathname.indexOf('/gallery/')) $('body').addClass('gallerypage').css('visibility', 'visible'); 

Actually, the question is, is this approach correct from the point of view of a reasonable person? : D
How is the page loaded as a document? Body tag is loaded, then the script and only after the script, everything else?
Or do you need to look for other solutions to the problem?
Because it seems like everything comes as usual, and my problem is solved in this way ...

And the problem itself sounds like this: I do not have an AoS script that connects to the body tag. To do this, I created a container inside the body that performs the function of this tag - just a wrapper for the entire size of the body. But when I turn off the body tag scroll vertically, but turn it on with the wrapper tag, the script does not animate when scrolling. Here is the problem more than completely.

  • Или нужно искать другие решения проблемы? - sobst you did not write what is the problem itself, which led you to such logical conclusions for the commission of such actions - Alexei Shimansky
  • @ Alexey Shimansky, I do not have an AoS script that connects to the body tag. To do this, I create a container inside the body that performs the function of this tag - just a wrapper in essence. But when I turn off the body tag scroll vertically, but turn it on with the wrapper tag, the script does not animate when scrolling. Here is the problem more than completely. Right now, add. - VostokSisters
  • @ Alexey Shimansky, but the problem is not that it does not work in such cases. It performs its function by connecting to the body tag, for which to blame him? The question is, is it correct to class classes in this way or not? - VostokSisters

0