Skip to content

Can jspsych-html-button-response-button be disabled? #1416

Answered by jodeleeuw
einGlasRotwein asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @einGlasRotwein,

Yes, you can disable the buttons. The reason your code doesn't work is that you are selecting the <div> element that contains the <button>. To access the disabled property you have to select the button itself. This should work:

document.querySelector('#jspsych-html-button-response-button-0 button').disabled = true;

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@jodeleeuw
Comment options

@einGlasRotwein
Comment options

Answer selected by jodeleeuw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants