the problem is following:
while adding a z-index of 10 to the overlay div its placed above the hovering element (so you aint hovering anymore).
a solution could be to place the overlay divs inside the hovering divs:
<div id="feature">
<div id="left-feature"><h2>Left</h2>
<div id="left-overlay">...</div>
</div>
<div id="right-feature"><h2>Right</h2>
<div id="right-overlay">...</div>
</div>
then i dont see any flickering.
plus id code jquery in a different way (but your way is totally ok as well..)
$(document).ready(function() {
$("div#left-overlay, div#right-overlay").hide();
$('div#left-feature').hover(function() {
$('div#left-overlay').fadeIn();
}, function() {
$('div#left-overlay').hide();
});
$('div#right-feature').hover(function() {
$('div#right-overlay').fadeIn();
}, function() {
$('div#right-overlay').hide();
});
});
and in the css you then dont need:
display:block; /*its a div, and those have block n-e-ways*/
opacity:0; /*i do this via jquery, or you make display: none; (for those whithout js)*/
-moz-opacity:0;
filter:alpha(opacity=0);
z-index: -10; /*no need for swapping z-index*/
the boxes need to be placed different then, cause the position absolute then starts at the zero of the surrounding div but...