Lord.
I listened to your ridicule and decided to understand the issue of creating and using JavaScript, I began to read the relevant literature, and then there was a discord in my head. In the book, Sir Flanigan writes that the script needs to be connected by reference, as expected, and its introduction to the page is very incorrect, but to learn more deeply, you need to shovel the n-th number of pages, and in order not to break the brain, I hasten to ask you like those who know and practice. To the question "google but not?" I will answer right away - I do not trust, anything can be written there, and they don’t have faith, but I don’t know more about accurate and reliable sources like you.
So, my familiar programmer took the script and shoved it into the widget located in the header. Yes, it works, yes, it rigidly animates, but it works.
Flanigan said, you need to connect via the head of reference. A programmer was taught 5 years. Question: who is right and what are the nuances?