Accordion color on active question

Hi, how can I change the question text color on the active question?

Hi @theenrico, to change the color, font, and font size on active header do the following:
Add 2 classes to the classmanger: .myclass.collapsed and .myclass give both the text styling as you wish. Add the class .myclass to the text in the header. To change the background color add:

<script>
$('.collapse').on('shown.bs.collapse', function () {
  headerDiv = '#'+$(this).attr('aria-labelledby');
  $(headerDiv).toggleClass('active');
});

$('.collapse').on('hidden.bs.collapse', function () {
  headerDiv = '#'+$(this).attr('aria-labelledby');
  $(headerDiv).removeClass('active');
});
</script>

to the page footer, and add:

<style>
.card-header.active  {
 background-color:myfancycolor;
}
</style>

to the page header.

The result will be:

3 Likes