Is there any way to move the numbers below the slider? | XM Community
Skip to main content

Hi, my slider question has 4 grid line points defined with numbers from 1 to 5 . I wanted to know if there is any code which allows me to move these numbers so that they appear below the slider bar?

Hi there, if you still need, I was able to put this in place by adding the below to the question's JavaScript in the OnReady section.
To add numbers beneath each slider statement, try using the below:
jQuery("#"+this.questionId+" > div.Inner.BorderColor.HSLIDER > div > fieldset > div > div > div.labels-container").insertAfter("#"+this.questionId+" table.sliderGrid.Slider");

To add numbers beneath just the last slider on the page, try using the below:
const last = Array.from(
  document.getElementsByClassName('slider-container')
).pop();

jQuery("#"+this.questionId+" > div.Inner.BorderColor.HSLIDER > div > fieldset > div > div > div.labels-container").insertAfter(last);
SliderNumbersBelow.png


Leave a Reply