How to update slider bar "pop-up" value to match labels? | XM Community
Skip to main content
Question

How to update slider bar "pop-up" value to match labels?

  • November 7, 2019
  • 2 replies
  • 87 views

Hi, See pic of survey below. I'd like to add JS code to update the slider question's scale popup label. For example, the popup scale label should read "(1) Extremely Satisfied" instead of "1", "(2) Somewhat Satisfied" instead of "2" I'm familiar with general code to change slider scale nums: var myCSS = "#" + this.questionId + " .q-slider .horizontalbar .numbers li"; var n = jQuery(myCSS).length; JQ = jQuery(myCSS + ":nth-of-type("+1+")"); val = Number(JQ.html()); JQ.html(val) →Using that general method I tried selecting using .q-slider slider-container, and changing the value. I was able to change the value, but as soon as you click/drag/move the slider it was overwritten and never displayed. Help me find a way to stop that from happening? Thanks. !

2 replies

  • February 24, 2021

Is there an answer to this somewhere?


rondev
Level 6 ●●●●●●
Forum|alt.badge.img+22
  • Level 6 ●●●●●●
  • February 27, 2021

Use Mutation Observer, check demo here.