Skip to content

Reference Prior Text Responses in Timeline Variable #3124

Answered by ggreeley
ggreeley asked this question in Q&A
Discussion options

You must be logged in to vote

Got it! The following works:

var looping_timeline = {
        timeline: [fixation, recall_phase_1_words],
        loop_function: function () {
            word_counter++;
            if (word_counter == jsPsych.data.get().filter({recall_phase: "recall-1"}).count() - 1) {
                return false
            } else {
                return true
            }
        }
    };

Thank you again for your help! Figuring the issue was with the loop_function syntax, I did some digging and came across #1911 - combined with the docs on the main page, I was able to work it out.

Thanks again @jodeleeuw!

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

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

@jodeleeuw
Comment options

@ggreeley
Comment options

@ggreeley
Comment options

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