Accordion menu color

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
asharma190
Posts: 4
Joined: Wed Feb 26, 2020

06 May 2020

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 4831 times

User avatar
mnikitina
Posts: 264
Joined: Wed Jun 05, 2019

07 May 2020

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" );

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 10 guests