/** * jspsych-survey-likert * a jspsych plugin for measuring items on a likert scale * * Josh de Leeuw * * documentation: docs.jspsych.org * */ jsPsych.plugins['survey-likert'] = (function() { var plugin = {}; plugin.info = { name: 'survey-likert', description: '', parameters: { nested: { type: jsPsych.plugins.parameterType.COMPLEX, array: true, question: {type: jsPsych.plugins.parameterType.STRING, pretty_name: 'Questions', default: undefined, description: 'Questions that are associated with the slider.'}, labels: {type: jsPsych.plugins.parameterType.STRING, array: true, pretty_name: 'Labels', default: undefined, description: 'Labels to display for individual question.'} }, preamble: { type: jsPsych.plugins.parameterType.STRING, pretty_name: 'Preamble', default: '', description: 'String to display at top of the page.' }, required: { type: jsPsych.plugins.parameterType.BOOL, array: true, pretty_name: 'Required', default: false, description: 'Makes answering questions required.' }, button_label: { type: jsPsych.plugins.parameterType.STRING, pretty_name: 'Button label', default: 'Next', description: 'Label of the button.' } } } plugin.trial = function(display_element, trial) { var html = ""; // inject CSS for trial html += ''; // show preamble text html += '