KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
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 structure goes, these two divs would be siblings. but visually they are stacked on one another. here's an example: <body> <div id="box1" style="background:#e0e0e0;height:100px;width:100px;"></div> <div id="box2" style="background:#000000;height:100px;width:100px;margin-top:-50px;"></div> </body> which results in this: so i'm trying to figure out, when having the black div, box2, a way to return box1 in jquery (using selectors), because box1 is beneath box2, using jquery.
Tags (comma-separated)
Save Edits
Cancel