jsPsych/tests&examples/jspsych-survey-text.html
2015-12-15 15:20:58 -05:00

33 lines
822 B
HTML

<!doctype html>
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="js/jquery-ui.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-survey-text.js"></script>
<link rel="stylesheet" href="css/jquery-ui.css"></link>
<link rel="stylesheet" href="../css/jspsych.css"></link>
</head>
<body>
<div id="jspsych-target"></div>
</body>
<script>
// defining groups of questions that will go together.
var page_1_questions = ["How old are you?", "Where were you born?"];
var survey_block = {
type: 'survey-text',
questions: page_1_questions
};
jsPsych.init({
display_element: $('#jspsych-target'),
timeline: [survey_block],
on_finish: function() { jsPsych.data.displayData(); }
});
</script>
</html>