Hello, I would like to create a task in which stimuli are presented to participants in the following way: each stimulus will auto-advance after 0.2 seconds to the following stimulus, unless the participant presses the space bar. If they press the space bar, I would like to make it so that it skips to the next block (or the end of the current block). I have used javascript so that space bar functions as the next button. Is there a way for me to create skip logic (maybe with another java script code) so that if the participant presses the space bar it skips to a different question instead of autoadvancing to the question which immediately follows. This is the code I'm currently using for space go to the next question: Qualtrics.SurveyEngine.addOnReady(function() {
$('NextButton').hide();
if($('PreviousButton')) $('PreviousButton').hide();
var evt = document.on('keydown', function(e) {
if (e.which == 32) { //space bar pressed
evt.stop();
$('NextButton').click();
}
});
});
Is there a way I can change this so that instead of to the next question it goes to a specific question later in the survey?
Thank you!
Question
Creating skip logic based on if space bar is pressed
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
