I have a <div> which has a rgba css value (transparent), which I want to change on a click of a button which is in a different <div>. The problem is that I am changing the color to a hex value and I can't seem to get rgba to work.
Code will be posted only if needed. My question is if .css() supports rgba
Try like this
var value1=$('#themeBackground1').val();
var opacity=$('#themeOpct1').val();
var rgbData=hexToRgb(value1);
value1='rgba('+rgbData.r+','+rgbData.g+','+rgbData.b+','+opacity+') !important;';
selector.attr('style', 'background-color:'+value1);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With