Use getVerticalOffset to find the distance from a given element to the top of the document.
Use Window.location.href to get the URL of the current page.
The clientWidth property indicates the width without scrollbar. The offsetWidth, on the other hand, includes the scrollbar if there is.
To check if the document is ready and execute some code, you bind an event listener to the DOMContentLoaded event of the document object.
A technique you can use to get all query string parameters and push them into an object of key/value pairs.
To get the width and height of an element, you use the offsetWidth and offsetHeight properties of the element.
How to get the width and height of the window in px.