问题
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