I am trying to animate a div with the id #test from a 0 opacity background to an opacity of 0.7 using CSS rgba values, but for some reason, the .animate function is not working as expected.
Here is my CSS:
#test {
background-color: rgba(0, 0, 0, 0);
}
This is my HTML:
<div id="test">
<p>Some text</p>
<img src="http://davidrhysthomas.co.uk/img/dexter.png" />
</div>
And here is my jQuery code:
$('#test').animate({ background-color: rgba(0, 0, 0, 0.7) },1000);
You can view the issue on jsFiddle: http://jsfiddle.net/malamine_kebe/7twXW/10/
Thank you for any assistance or insights!