Page 1 of 1

Accordion menu color

Posted: 06 May 2020
by asharma190
Hello, I am fairly new to plumsail and wanted to see how would I change background color for the accordian tabs? The business wants a different color for each of the accordion. Any help would be really appreciated!
Capture.JPG
Capture.JPG (59.07 KiB) Viewed 2667 times

Re: Accordion menu color

Posted: 07 May 2020
by mnikitina
Hello asharma190,

You can use this code in JavaScript editor to change the background color of each accordion tab. Where #fd_accordion-0 - zero is the number of accordion control on the form

Code: Select all

//tabs
var tab1 = $( "h3" )[0];
var tab2 = $( "h3" )[1];
var tab3 = $( "h3" )[2];

//change background color of the first tab
$( "#fd_accordion-0" ).find(tab1).css( "background-color", "red" );
//change background color of the second tab
$( "#fd_accordion-0" ).find(tab2).css( "background-color", "yellow" );
//change background color of the third tab
$( "#fd_accordion-0" ).find(tab3).css( "background-color", "blue" );