/** * jspsych-image-slider-response * a jspsych plugin for free response survey questions * * Josh de Leeuw * * documentation: docs.jspsych.org * */ jsPsych.plugins['image-slider-response'] = (function() { var plugin = {}; jsPsych.pluginAPI.registerPreload('image-slider-response', 'stimulus', 'image'); plugin.info = { name: 'image-slider-response', description: '', parameters: { stimulus: { type: jsPsych.plugins.parameterType.IMAGE, default: undefined, no_function: false, description: '' }, min: { type: jsPsych.plugins.parameterType.INT, default: 0, no_function: false, description: '' }, max: { type: jsPsych.plugins.parameterType.INT, default: 100, no_function: false, description: '' }, step: { type: jsPsych.plugins.parameterType.INT, default: 1, no_function: false, description: '' }, labels: { type: jsPsych.plugins.parameterType.KEYCODE, default: [], array: true, no_function: false, description: '' }, button_label: { type: jsPsych.plugins.parameterType.STRING, default: undefined, no_function: false, array: false, description: '' }, prompt: { type: jsPsych.plugins.parameterType.STRING, default: '', no_function: false, description: '' }, stimulus_duration: { type: jsPsych.plugins.parameterType.INT, default: -1, no_function: false, description: '' }, trial_duration: { type: jsPsych.plugins.parameterType.INT, default: -1, no_function: false, description: '' }, response_ends_trial: { type: jsPsych.plugins.parameterType.BOOL, default: true, no_function: false, description: '' }, } } plugin.trial = function(display_element, trial) { var html = '