Slider for a trade-off between two options | Experience Community
Skip to main content
Question

Slider for a trade-off between two options

  • Jun 24, 2020 11:37 AM UTC
  • 3 replies
  • 637 views

Forum|alt.badge.img+1

Hi everyone,
I would like to use a slider to allow subjects to make a trade-off between two options. Specifically, I want to let them assign a probability to both options which will add up to 100% (e.g. 70% of getting option X and 30% chance of getting option Y). Something along the lines of the screenshot below.
I have seen solutions to getting labels at both ends of the slider. But I am struggling with how to remove the values above the slider and showing the probabilities of the two options (below the slider or somewhere else) while the subjects are moving the slider bar.
Slider.PNGI have some basic understanding of JS, but I find it hard to find a starting point. If anyone can point me into the right direction that would be greatly appreciated!

3 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • Jun 24, 2020 5:02 PM UTC

The best solution is to use a MutationObserver to update the percentages when the slider handle changes position.


Forum|alt.badge.img+1
  • Sep 12, 2022 5:50 PM UTC

https://community.qualtrics.com/XMcommunity/discussion/10850/slider-for-a-trade-off-between-two-optionsHi Sarts,
Have you solved this question? I have a similar question. Would you please share your code with me?


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • Sep 13, 2022 3:31 PM UTC