Skip to content

While loop did not display text element as specified #844

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

You must be logged in to vote

In your else block there are two issues with the setTimeout method.

The first is that the first parameter to setTimeout should be function. At first glance it looks like you are passing a function, but you are actually calling the finishTrial() function and using the value of that function as the argument.

The second is that your timeout value is 200ms instead of 2,000ms.

Try this instead:

jsPsych.pluginAPI.setTimeout(function(){ jsPsych.finishTrial(trial_data) },2000); 

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@anjiecao
Comment options

@jodeleeuw
Comment options

@anjiecao
Comment options

@jodeleeuw
Comment options

Answer selected by anjiecao
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