Skip Navigation

[Resolved] Accordion alternate color

This support ticket is created 7 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 4 replies, has 2 voices.

Last updated by oriolc 7 years, 10 months ago.

Assisted by: Minesh.

Author
Posts
#464138

I am trying to alternate colors with css even and odd in panel-heading in layout accordion.
I've tryed using .panel-heading:nth-child(even) and .panel-heading:nth-child(odd) but won't change anything.
I can't use id cause change each browser actualization.
I found that topic: https://toolset.com/forums/topic/how-to-style-accordion-panel-header/ but doesn't help me.
Can you give any help?
Thank you very much

#464259

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - as I suggested here that it needs custom CSS or jQuery code to implement it and custom programming is out of the scope of our support policy:
=> https://toolset.com/forums/topic/how-to-style-accordion-panel-header/#post-438824

But - if you can share problem URL I can give a try and check if I can implement it for you.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

I have set the next reply to private which means only you and I have access to it.

#464364

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I've added the following code to your Layout's CSS:

jQuery(document).ready(function($){
  
  $('.panel-heading:even').each(function(){
    console.log(this);
  	$(this).prop('style','background-color:yellow !important');
  });
  
  $('.panel-heading:odd').each(function(){
    console.log(this);
  	$(this).prop('style','background-color:blue !important');
  });
   
});

I've added yellow and blue color as the alternate color. I hope this solution will help you to resolve your issue.

#465413

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I hope the solution I added worked for you and issue is resolved. If yes - could you please mark this ticket as resolved.

#466336

Sorry. I forget to answer you.
Yes, your changes help me.
Thank you very much.

This ticket is now closed. If you're a Toolset client and need related help, please open a new support ticket.