Solved
How can I hide the anchor on a sliding scale question?
I need something to hide the anchor on the sliding scale question BEFORE the question is answered. The anchor can appear after the question has been answered. How can I do this?
Best answer by Michael_Campbell_RedPepper
Heck yeah!! Here is some code that I spun up really quickly for you!
```
Qualtrics.SurveyEngine.addOnload(function()
{
/*Place your JavaScript here to run when the page loads*/
});
Qualtrics.SurveyEngine.addOnReady(function()
{
/*Place your JavaScript here to run when the page is fully displayed*/
const PREREQ_SELECTOR = '#QID1 > div.Inner.BorderColor.MAVR > div > fieldset > div > ul';
const SLIDER_SELECTOR = 'QID6~1~handle';
const PREREQ = $(PREREQ_SELECTOR);
const SLIDER = $(SLIDER_SELECTOR);
console.log(SLIDER);
console.log('Hiding Slider');
SLIDER.hide();
PREREQ.click(() => {
console.log('Showing Slider');
SLIDER.show();
})
});
Qualtrics.SurveyEngine.addOnUnload(function()
{
/*Place your JavaScript here to run when the page is unloaded*/
});
```
Put this in the Slider's JS panel. The PREREQ_ID is the Selector of the *List* of items that are selectable.
SLIDER is the Selector of the, well, the Slider haha.
Here is a _crude_ screenshot of how to select the *List* item.. Sorry, I don't have the tools to make fancy ones :)
!
View original
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.