0

Is it possible to apply opacity to jQuery tabs? It works for accordions but I can't get it to work for tabs.

CSS

    .ui-tabs{
    background-image: none;
    background: rgba(204, 204, 204, 0.5);
    }

    .ui-tabs-nav{
    background-image: none;
    background: rgba(204, 204, 204, 0.5);
    }

    .ui-tabs-panel{
    background-image: none;
    background: rgba(204, 204, 204, 0.5);
    }
Jon
  • 215
  • 1
  • 3
  • 16
  • Have you tried anything yourself? – Chris G Jan 13 '16 at 14:27
  • 1
    Possible duplicate of [Change only Alpha channel in background-color](http://stackoverflow.com/questions/30794997/change-only-alpha-channel-in-background-color) – CoderPi Jan 13 '16 at 14:32

2 Answers2

0

You can change it with JQuery .css()

var myAlpha = 0.1
$(".ui-tabs").css({ "background-color": "rgba(204, 204, 204, "+myAlpha+")"})
CoderPi
  • 12,985
  • 4
  • 34
  • 62
0

Use the .css():

$(".ui-tabs").css({ "background-color": "rgba(204, 204, 204, 0.5)"})
Praveen Kumar Purushothaman
  • 164,888
  • 24
  • 203
  • 252