document.querySelector()
behaves similarly to the jQuery.(document).ready()
method. When the DOM is ready, the selector returns the object.
I would suggest you call all JS script bottom of the page.
document.querySelector()
behaves similarly to the jQuery.(document).ready()
method. When the DOM is ready, the selector returns the object.
I would suggest you call all JS script bottom of the page.