Need help in creating a slider bar in qualtrics that is colored- going from
red to green.
If you help with custom code for that.
Which part of the javascript I add custom code?
Page 1 / 1
Hi sadhnav,
Add the following to the "onLoad()" function of your question:
Qualtrics.SurveyEngine.addOnload(function()
{
///*Place your JavaScript here to run when the page loads*/
jQuery(".track").css("background", "linear-gradient(to right, red, lightgreen)")
});
Alternatively you can just add the following to your custom CSS if you want it applied to all questions:
.track {
"background": "linear-gradient(to right, red, lightgreen)"
}
If you want to customise the colour gradient, you can read all about the linear-gradient function here: https://developer.mozilla.org/en-US/docs/Web/CSS/gradient/linear-gradient
Good luck!
Thank you for the help!!
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.