https://parpostlasbird.blogspot.com/2023/05/why-is-function-declared-in.html
Why Is A Function Declared In Document.ready() Not Defined When Called?