Can jspsych-html-button-response-button be disabled? #1416
-
Hey everyone, I am trying to disable a html response button (and enable it after some time has passed) from the html-button-response plugin. Hiding a response button works: However, disabling it doesn't have an effect: Can those buttons be disabled? And if so, how? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @einGlasRotwein, Yes, you can disable the buttons. The reason your code doesn't work is that you are selecting the
|
Beta Was this translation helpful? Give feedback.
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 thedisabled
property you have to select the button itself. This should work:document.querySelector('#jspsych-html-button-response-button-0 button').disabled = true;