Hello,
I am trying to change the background color of the slider bar (Draggable Sliders) to a color gradient going from red to yellow to green. I found the following post <https://www.qualtrics.com/community/discussion/2269/color-transition-in-slider-bar> which addresses my question and used the following custom css from that link:
.Skin .horizontalbar .Slider .track {
background-image: linear-gradient(-90deg,red,yellow,green);
}
Once the css has been added the slider bars disappear (see included image) instead of the intended color gradient.I also tried the following javascript but had similar results.
var that=this.questionId;
jQuery(".track:eq(0)").css({ "background-image":"linear-gradient(-90deg,red,yellow,green)"});
Does anyone know why this might be happening and how to rectify the issue?
Solved
Change Color of Slider Bar from Gray to Color Gradient
Best answer by rondev
Paste the below code in the slider question, add javascript Onready function:
jQuery(".track:eq(0)").css({ "background-image":"linear-gradient(-90deg,green,yellow,red)"});
Output:
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.