How can i change the background color in jQuery.ui

2019-08-19 02:07发布

I am trying to change the background color of tabs in jquery.ui tabs. Normally it works by default color. My code is

<div id="tabs">
    <ul>
        <li><a href="#1"><span>Home</span></a></li>
        <li><a href="#2"><span>Home</span></a></li>
    </ul>

    <div  id="1">
        <p>MY DATA</p>
    </div>
    <div id="2">
        <p>MY DATA 2nd</p>
    </div>
</div>

<script>
   $( "#tabs" ).tabs();
   $('#tabs').bind('tabsshow', function(event, ui) { 
        $('#tabs').css('background-color', '#231f20');
    });
</script>

Thanks in advance

1条回答
Anthone
2楼-- · 2019-08-19 02:22
.ui-tabs .ui-tabs-nav a
{
   background-color: #231f20;
}
查看更多
登录 后发表回答