Hi !
In my survey, I have a block of questions with the following structure: Q1, Q2, Q3, Q4
for the first iteration of my Loop, I wanted certain questions to appear (Q1 and Q2) and then to skip directly to another one (Q5). Then, for the second iteration onwards, i wanted questions to appear (Q2 and Q4), skipping Q1 and Q2, which should only appear in the first iteration, and going directly to Q5.
I managed to do it with the following JS:
JS in Q2 and Q2:
Qualtrics.SurveyEngine.addOnload(function() {
if("${lm://CurrentLoopNumber}" != "1")jQuery("#"+this.questionId).hide();
if("${lm://CurrentLoopNumber}" != "1")jQuery("#Buttons").hide();
});
Qualtrics.SurveyEngine.addOnReady(function()
{
if("${lm://CurrentLoopNumber}" != "1")jQuery("#Buttons").hide();
if("${lm://CurrentLoopNumber}" != "1")jQuery('#NextButton').click();
});
JS for Q3 and Q4:
Qualtrics.SurveyEngine.addOnReady(function() {
// Check if the loop number is 1 (first iteration)
if(parseInt("${lm://CurrentLoopNumber}", 10) === 1) {
// Hide the question container
jQuery("#"+this.questionId).hide();
// Hide the navigation buttons
jQuery("#Buttons").hide();
// Automatically click the 'Next' button to advance to the next question
jQuery('#NextButton').click();
}
});
The problem is that i can clearly see the jumps of questions in the survey. I changed the Look and Feel to Page transition: Fade, but there is still a noticeable jump, and a time delay between the questions that appear.
Is there a way to fix this so that respondents don’t notice?
Thank you!!!