My situation is this: I have 2 partially overlapping divs that each have hover effects: Div 1 - Contains a bar chart, the bars in which have effects on hover. Div 2 - Is an area that spans the bottom 20% of the screen and when the user hovers over it (e.g. near the bottom of the screen) a control slides up from the bottom to allow them to change global properties to the table.
I want the browser to independently detect hover on either object, but what is happening is that whatever object is on top detects hover, but the other does not. I've found a bunch of almost related questions, but nothing that seems to answer this.
This is for a prototype, so hacky answers/answers that work only in one browser (preferably Chrome) are fine. Also solutions using CSS, jQuery, or JS are all OK.
Edit: added a fiddle that I think will illustrate my problem: http://jsfiddle.net/Gkgrx/
So if you hover to the bottom of the "table" (big red square that turns green on hover), when I hit the area that causes the table control to slide up (which it does) the table loses its hover state - I want it to still detect the hover.
Evidently I need to cut and paste the code here:
CSS:
.controlhover {
position: absolute;
bottom: 0px;
left: 0px;
right: 0px;
height: 150px;
z-index: 1;
}
.tablecontrol {
position:absolute;
bottom: 0px;
left: 200px;
right: 200px;
background-color: #242D2F;
opacity: .9;
height: 70px;
color: #FFFFFF;
}
.table {
position: absolute;
top: 0px;
left: 50px;
right: 50px;
height: 500px;
background-color: red;
}
.table:hover {
background-color: green;
}
HTML:
<div class="table">This is a table that does stuff on hover</div>
<div class="controlhover"></div>
<div class="tablecontrol">This is the sliding control element</div>
JS:
$('.tablecontrol').slideUp();
$('.controlhover').hover(function(){
$('.tablecontrol').slideDown()
}, function() {
$('.tablecontrol').slideUp();
});
Thanks