jsPsych/tests&examples/jspsych-same-different.html
2015-12-17 13:57:53 -05:00

39 lines
872 B
HTML

<!doctype html>
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-same-different.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>
<style>
img {
width: 300px;
}
</style>
</head>
<body>
<div id="jspsych-target"></div>
</body>
<script>
var block = {
type: 'same-different',
stimuli: ['img/happy_face_1.jpg', 'img/sad_face_3.jpg'],
prompt: "<p class='center-content'>Press S if the faces had the same emotional expression. Press D if the faces had different emotional expressions.</p>",
same_key: 'S',
different_key: 'D',
answer: 'different'
}
jsPsych.init({
display_element: $('#jspsych-target'),
timeline: [block],
on_finish: function() {
jsPsych.data.displayData();
}
});
</script>
</html>