Hi everyone!
I'm trying to incorporate a key press with some display logic and am struggling a bit (I am new to Javascript).
Basically, I have a question, and if a participant presses a spacebar in response to this question, they get directed to one question, and if they don't, they get directed to another.
So far I have:
Qualtrics.SurveyEngine.addOnload(function() {
var qid = this.questionId;
document.onkeydown = function(event) {
console.log('keydown',event);
if (event.which == 32) {
event.preventDefault();
jQuery('#NextButton').click()
}
}
})
I have no idea how to incorporate the display logic I desire...can anyone help? Thank you!
Question
How to code a key press to incorporate display logic?
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
