Skip to content
Discussion options

You must be logged in to vote

Hmm, your code is working fine for me! I created 4 images to test this: 'dog-old.gif', 'dog-new.gif', 'boat-old.gif', and 'boat-new.gif'. I also set response_ends_trial to false and trial_duration to 5 seconds, so that the trial doesn't end as soon as a button is clicked. Finally, I took the button_html string out of a function (it does work the same way inside of a function, it just doesn't need to be inside of one).

So the code below is working for me. If I click on one of the buttons before the 5 second trial duration is up, then I see the button image change.

var grid_buttons = {
    type: 'html-button-response',
    stimulus: '',
    choices: ['dog','boat'],
    button_html: '<button…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@jgerard417
Comment options

@becky-gilbert
Comment options

@jgerard417
Comment options

@becky-gilbert
Comment options

@jgerard417
Comment options

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