Skip to content
Discussion options

You must be logged in to vote

Hi @BobRoss048, sorry for the delay.

It looks like in the plugin file you're using the randvert variable to set the image position to the top or bottom of the page. This means you could also use that variable to categorize the image position as "top"/"bottom", and store that information in the trial data. Here's one way to do it inside of the end_trial function:

// function to end trial when it is time
function end_trial() {
  // kill any remaining setTimeout handlers
  jsPsych.pluginAPI.clearAllTimeouts();

  // create a variable that will store the image position - either "top" or "bottom"
  var image_position = null;
  if (randvert[0].vertical == "flex-start") {
    image_position = "top"

Replies: 1 comment 1 reply

Comment options

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

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