This is not jquery, the calculated value for the color is represented in RGBa (red, blue, green, alpha for opacity), and not as color names (for example, red, blue, orange, transparent, etc.) or as hexadecimal values. According to the specification, transparency is represented as rgb(0, 0, 0) .
if the value is translucent, the corresponding rgba () will be the calculated value. If it is not, it will be the corresponding rgb (). The transparent keyword matches rgb (0,0,0).
So instead of looking for that particular value, you can add a specific CSS rule to enable transparency and add this class to the element, and use .hasClass or .is this class to check the transparency of the element.
It seems that different browsers present it differently, IE, FF gives the value as transparency , so it's better not to rely on this representation of the value for any logic.
source share