if i have 2 divs (z index is not assigned), one layered over the over, can i use the reference to the top div to find which div is below it?
as far as the DOM struct
Maybe something along these lines... detach the element under your cursor (in this case box1) and use document.elementFromPoint to fetch the next element underneath that x,y position.. rough example:
var first_box = $('#box1');// more programmaticaly would be to use document.elementFromPoint to fetch the element under your cursor
var first_box_offset = first_box.offset();
var x = first_box_offset.left;
var y= first_box_offset.top + first_box.height();
var reattach_me = first_box.detach();
var second_box = document.elementFromPoint(x, y);
$('body').append(reattach_me);