Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Group name color

  • nhotovas
  • nhotovas's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 6 months ago - 6 years 6 months ago #159162 by nhotovas
Group name color was created by nhotovas
Dear all,

I need to change group-name color, in case that answer on questionX, from previous group is "Don't know" (question type is list-radio).
I found code for changing question text color ( in below), but I have no idea how to implement this for group-name?

<script type="text/javascript">
$(document).ready(function() {
$("<style type='text/css'>"
+ "#question{QID} .questiontext { color:red }"
+"</style>").appendTo( "head" );
});
</script>

Thanks in advance.
Regards!
Last edit: 6 years 6 months ago by nhotovas.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 6 months ago #159204 by tpartner
Replied by tpartner on topic Group name color
Assuming you are using the default template of a current version, something like this will dynamically change the group name color:

Code:
<script type="text/javascript" charset="utf-8">
  $(document).on('ready pjax:complete',function() {
    $('.group-name').css({
      'color': '#FF0000'
    });
  });
</script>

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • nhotovas
  • nhotovas's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 6 months ago #159377 by nhotovas
Replied by nhotovas on topic Group name color
Dear Tony,

excellent as always. Thank you very much!
Very sorry for not thanking you straight away as you provided an answer, but I am very thankful even when so busy.

Regards!
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose