Conditional Format of Tabs

I can hide tabs / make them inactive based on list values however I'm struggling to work out how to change the background colour of a tab based on the same values.

I have tried the following, but this is obviously not correct, is there any way of doing this?

fd.container('Tab1').tabs[1].css('background-color','red');

thanks

Hello @Nathan,

Welcome to Plumsail Community!

To change the background color of the specific tab, please do the following:

  1. Assign a CSS class to the Tab container, e.g. 'tabToChange'
    image
  2. Use the code below to change the color of the second tab. 1 is the index of the tab.
$( "div.tabToChange" ).find( "a.nav-link" ).eq( 1 ).css( "background-color", "red" );
1 Like

Thanks for that, works perfectly.

1 Like