How can I check for collision between certain divs?
At the moment I'm using getBoundingClientRect()
, but it checks for every div:
if (this.getBoundingClientRect()) {
animateContinue = 1;
}
How would I go about checking specific ones? Using this for
loop, I can get the IDs of the divs I want to check:
for (var x = 1; x <= noOfBoxArt; x++) {
console.log('#boxArt' + x);
}