mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-10 11:10:54 +00:00
Change broken selection in enable_button_after parameter
The button class was not being selected correctly resulting in a broken enable_button_after parameter
This commit is contained in:
parent
2b1f93d232
commit
923057049e
@ -201,12 +201,12 @@ class HtmlButtonResponsePlugin implements JsPsychPlugin<Info> {
|
|||||||
|
|
||||||
// disable all the buttons and set a timeout that enables them after a specified delay if timing is set
|
// disable all the buttons and set a timeout that enables them after a specified delay if timing is set
|
||||||
if (trial.enable_button_after > 0) {
|
if (trial.enable_button_after > 0) {
|
||||||
var btns = document.querySelectorAll(".jspsych-html-button-response-button button");
|
var btns = document.querySelectorAll("#jspsych-html-button-response-btngroup button");
|
||||||
for (var i = 0; i < btns.length; i++) {
|
for (var i = 0; i < btns.length; i++) {
|
||||||
btns[i].setAttribute("disabled", "disabled");
|
btns[i].setAttribute("disabled", "disabled");
|
||||||
}
|
}
|
||||||
this.jsPsych.pluginAPI.setTimeout(() => {
|
this.jsPsych.pluginAPI.setTimeout(() => {
|
||||||
var btns = document.querySelectorAll(".jspsych-html-button-response-button button");
|
var btns = document.querySelectorAll("#jspsych-html-button-response-btngroup button");
|
||||||
for (var i = 0; i < btns.length; i++) {
|
for (var i = 0; i < btns.length; i++) {
|
||||||
btns[i].removeAttribute("disabled");
|
btns[i].removeAttribute("disabled");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user