¿Cómo puedo animar la opacidad del fondo de un div?
Tengo un test # div con un fondo de opacidad de 0, quiero animarlo hasta alcanzar la opacidad de 0.7. Pero .animate no parece funcionar con el css rgba.
Mi css es:
#test {
background-color: rgba(0, 0, 0, 0);
}
mi html:
<div id="test">
<p>Some text</p>
<img src="http://davidrhysthomas.co.uk/img/dexter.png" />
</div>
y mi jQuery:
$('#test').animate({ background-color: rgba(0, 0, 0, 0.7) },1000);
Aquí un jsFiddle:http://jsfiddle.net/malamine_kebe/7twXW/10/
¡Muchas gracias por ayudar!