I have a fixed-positioned-div ("under") and a relative-positioned-div ("over") that slides and covers the first when user scrolls the window:
CSS
.under {
position:fixed;
top:0px;
z-index:1;
display:block;
width:300px;
height:200px;
background-color:#aaa;
}
.over {
display:block;
width:300px;
height:1200px;
position:relative;
z-index:2;
margin-top:200px;
background-color:green;
}
My goal is to create a jQuery script to trigger the moment when the "under" div is completely covered/hidden from the "over" div. I guess that the key is to find out if an element is visible on screen (not covered from other elements). Is it possible?
Thanks in advance.