Changing the Color of the Numbers in a Slider Question | XM Community
Skip to main content

Hi-I am trying to change the color of my numbers in a slider question since the background of my survey is white and the numbers are white. I am new to using JavaScript, but I was told by a Qualtrics representative that I could use custom code to do this. Does anyone have any ideas or resources about how to code this?

 

A second, unrelated question: is there a way to remove a matrix option for one question? The example I have is that I have a matrix of things that people could have experienced during COVID for oneself and people one knows. The option “died from COVID” is applicable for the other options (e.g. family member, friend, community member) but not for the “me” category. Is there a way to remove that option just for “me” but to keep it for the other people options?

 

Thank you!

Hi @cxa5393 

  1. You can use the below code to change the number color of the slider question.

Qualtrics.SurveyEngine.addOnReady(function () {
    // Change the color of numbers in the slider according to your need
    jQuery("ul.numbers li").css("color", "#FFB300");
});

 

  1. Regarding your second query you can use the below code.
     

Qualtrics.SurveyEngine.addOnload(function()
{
    var $j = jQuery.noConflict();

$j(document).ready(function(){
    // Hide the 3rd scale point for the first row, adjust it according to your need
    $j("tbody .ChoiceRow").eq(0).find("td").eq(2).hide();
});

 


Leave a Reply