Changing background color of a single question | XM Community
Skip to main content
Solved

Changing background color of a single question

  • March 28, 2019
  • 2 replies
  • 251 views

Hi. Could someone help me with the javascript to set the background color of a single 'descriptive text' type question to a specific hex code?

Best answer by Anonymous

Hello @jmcpherson , Paste the below code in the js(OnReady) of the descriptive question: ` jQuery("#"+this.questionId+" .QuestionText").css("background","YOUR_HEX_CODE");`

2 replies

  • Answer
  • March 28, 2019
Hello @jmcpherson , Paste the below code in the js(OnReady) of the descriptive question: ` jQuery("#"+this.questionId+" .QuestionText").css("background","YOUR_HEX_CODE");`

  • Author
  • March 28, 2019
Thanks! That worked!