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

Changing background color of a single question

  • Mar 28, 2019 4:14 PM UTC
  • 2 replies
  • 321 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");`
View original

2 replies

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

  • Author
  • Mar 28, 2019 5:24 PM UTC
Thanks! That worked!