I have a which has a rgba css value (transparent), which I want to change on a click of a button which is in a different . 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);