How can i change the background color in jQuery.ui tabs

老子叫甜甜 提交于 2020-01-06 11:10:31

问题


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:


.ui-tabs .ui-tabs-nav a
{
   background-color: #231f20;
}


来源:https://stackoverflow.com/questions/15478303/how-can-i-change-the-background-color-in-jquery-ui-tabs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!