Elements position in JavaScript
getBoundingClientRect() is a javascript function that returns the position of the element relative to viewport of window.
const position = selector.getBoundingClientRect();
getBoundingClientRect() is a javascript function that returns the position of the element relative to viewport of window.
Comments