If I have a DIV element (the blu square B in the figure) absolutely positioned in the document and overlapped on another DIV (blank square A), then I can get if B cover completely A by comparing x1,y1,x2,y2 region of B with A.
However, if one or more B squares overlap A, how can I get if A is completely covered?
I cannot merge B1 and B2 regions then compare it with A because some areas may be still uncovered (as red areas in the figure).
In Flash there are some methods that simplify the calculation of regions but I don't figure out how to do it in jQuery.