`rgba is not supported by ie8.
However there is a trick for transparency in i.e8
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=
The first 2 digits #7F000000 is the opacity, and the next 6 digits are the hex color code.
7f is the equivalent of 50%
So your code should look like this:
.css({ 'background-color': 'rgba(0,0,0,0.5)' }) //Problem here in IE8 .css({'filter' : 'progid:DXImageTransform.Microsoft.gradient(startColorstr=#50000000,endColorstr=#50000000);'}) //IE Fallback
Sources: http://css-tricks.com/rgba-browser-support/
Edit: after Derek Henderson's comment, I will not write code, but if you want to add it only in IE8, check jQuery.browser
source share