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

38 lines
953 B
HTML

<!DOCTYPE html>
<html>
<head>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-categorize-animation.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>
<style>
img {
width: 300px;
}
</style>
</head>
<script>
var trials = {
type: 'categorize-animation',
stimuli: ['img/happy_face_1.jpg', 'img/sad_face_3.jpg'],
key_answer: 68,
choices: [68, 83],
text_answer: 'different',
correct_text: "<p class='center-content'>Correct. The faces had %ANS% expressions.</p>",
incorrect_text: "<p class='center-content'>Incorrect. The faces had %ANS% expressions.</p>",
prompt: "<p class='center-content'>Press D if the faces had different emotional expressions. Press S if the faces had the same emotional expressions.</p>",
};
jsPsych.init({
timeline: [trials],
on_finish: function() {
jsPsych.data.displayData();
}
});
</script>
</html>