Skip to content
Discussion options

You must be logged in to vote

Hi Ben!

You can define trials as variables and then put them on a timeline:

var fixation_cross = {
  type: 'html-keyboard-response',
  stimulus: '<div style="font-size:60px;">+</div>',
  choices: jsPsych.NO_KEYS,
  trial_duration: 1000
}

var audio_image_1 = {
  type: 'audio-keyboard-response',
  stimulus: jsPsych.timelineVariable('sound'),
  choices: jsPsych.NO_KEYS,
  prompt: function () {
    var html = "<div class=wrapper><img src=" + jsPsych.timelineVariable('shape1') + " class=rotate class=box width=100 height=100 /><div style=font-size:60px;>+</div><img src=" + jsPsych.timelineVariable('shape2') + " class=rotate class=box width=100 height=100/></div>";
    return html;
  },
  trial…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@BKTidswell
Comment options

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