I have two divs (rectangles) that overlap each other. How do I determine the amount of intersection/overlap between the two divs in javascript?
I realize I'll get the dimensions for each rectangle:
offset.top, offset.left, elt.offsetWidth, elt.offsetHeight
But from there I'm unsure how to determine the amount of overlap.