How to add Percentages to Incremental Value on a Slider Question | XM Community
Skip to main content
Solved

How to add Percentages to Incremental Value on a Slider Question

  • December 20, 2024
  • 4 replies
  • 51 views

Forum|alt.badge.img+1

I am trying to add percentage symbols for the values given on the increments for the slider question- is there a java code or some capabilities through qualtrics to allow me to do this? 

Best answer by TomG

Oops, I copied it from somewhere else and forgot to change a variable name.  Corrected:

Qualtrics.SurveyEngine.addOnload(function() {
	jQuery("#"+this.questionId+" ul.numbers li").each(function() {
		this.innerText = this.innerText + "%";
	});
});

 

View original

4 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 5926 replies
  • December 20, 2024

If you want to add % signs to the scale, you can do this (code for “New Experience” would be different):

Qualtrics.SurveyEngine.addOnload(function() {
	jQuery("#"+qobj.questionId+" ul.numbers li").each(function() {
		this.innerText = this.innerText + "%";
	});
});

 


Forum|alt.badge.img+1
  • Author
  • Level 2 ●●
  • 6 replies
  • December 20, 2024
When I add it to the java script, should it look like this? When I input it this way, I still don’t get the % symbols next the incremental values on the scale. 

 


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 5926 replies
  • Answer
  • December 20, 2024

Oops, I copied it from somewhere else and forgot to change a variable name.  Corrected:

Qualtrics.SurveyEngine.addOnload(function() {
	jQuery("#"+this.questionId+" ul.numbers li").each(function() {
		this.innerText = this.innerText + "%";
	});
});

 


Forum|alt.badge.img+1
  • Author
  • Level 2 ●●
  • 6 replies
  • December 24, 2024

Thank you so much, Tom! This worked! 


Leave a Reply