Answer the question
In order to leave comments, you need to log in
Why does it return an error when trying to find out getBoundingClientRect in forEach?
const circles = document.querySelectorAll('<класс>');
window.addEventListener('scroll', ()=>{
circles.forEach((circle)=>{
console.log(circle.getBoundingClientRect());
});
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question