Skip to content

Add "Skip" button to image-button-response #1294

Answered by becky-gilbert
kburkin asked this question in Q&A
Discussion options

You must be logged in to vote

Sure, you can do it like this:

  1. Rename your plugin file (to avoid overwriting or getting it confused with the original one). In your modified version, change the plugin name to the new name in these places at the top of the file:
    -jsPsych.plugins["image-button-response"]
    -jsPsych.pluginAPI.registerPreload('image-button-response'
    -plugin.info = { name: 'image-button-response'
  2. In the plugin file, after the response buttons have been added to html string, and before the page is updated with display_element.innerHTML = html, add the HTML for your skip button. In the code below, I used the HTML for the button choices as a template for making this new button, and just replaced things like the <…

Replies: 1 comment 1 reply

Comment options

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

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