I have a question about CSS:
.class1 { background: #fff }
Now, I need to achieve the following:
.class2 { background: rgba(255,0,0,0.5) };
Is there a way to use JavaScript only to change the background
property of .class1
and give it an opacity of 0.5?
For instance, could I do something like this:
$('.class1').css('background-opacity', '.5');
If anyone has any suggestions or solutions, please share!
Thank you