jsPsych/examples/jspsych-survey-likert.html
2016-12-09 21:25:56 -05:00

32 lines
832 B
HTML

<!DOCTYPE html>
<html>
<head>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-survey-likert.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>
</head>
<script>
// defining groups of questions that will go together.
var page_1_questions = ["I like vegetables.", "I hate eggs."];
// defining two different response scales that can be used.
var scale_1 = ["Strongly Disagree", "Disagree", "Neutral", "Agree", "Strongly Agree"];
var likert_block = {
type: 'survey-likert',
questions: ["I like vegetables.", "I like fruit."],
labels: [scale_1, scale_1], // need one scale for every question on a page
};
jsPsych.init({
timeline: [likert_block],
on_finish: function() { jsPsych.data.displayData(); }
});
</script>
</html>