I have this html:
<div class="foo parent">
<div class="child"></div>
</div>
with some css:
.foo{
position:absolute;
left: -117px;
background:#000000 none repeat scroll 0 0;
color:#FFFFFF;
z-index:8;
}
.parent{
top:23px;
width:100px;
height:30px;
display:none; #parent and child to start out hidden
}
.child{
position:relative;
left:94px;
top:5px;
height:20px;
width: 110px;
background:#000000;
z-index:9;
}
I want this parent and child to fade in together, and end up with opacity:0.50. Firefox does this just fine, but IE gives trouble: When I do a fadeIn() or fadeTo() or just even simply apply .css('opacity','0.50') on the parent, the parent renders and the child doesn't.
$('.parent').fadeTo('fast',0.50)
--> causes the parent to fade in but the child never appears.
$('.parent').fadeIn('fast')
--> parent appears, no child
$('.parent').css('opacity','0.55')
$('.parent').show()
--> parent appears with opacity, child never appears
$('.parent').show()
--> parent and child appear just fine (but with no animation or transparency). If I do
$('.parent').css('opacity','0.55') or $('.parent').fadeTo('fast', 0.50)
afterward, the parent gets the effect and the child disappears.
How can a parent and child be animated together and share opacity properties?