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

33 lines
668 B
HTML

<!DOCTYPE html>
<html>
<head>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-xab.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>
<style>
img {
width: 300px;
}
</style>
</head>
<script>
var block_1 = {
type: 'xab',
stimuli: ['img/happy_face_1.jpg', 'img/happy_face_2.jpg'],
prompt: "<p class='center-content'>Press Q if the face you just saw is on the left. Press P if the face you just saw is on the right.</p>",
timing_response: 2000
}
jsPsych.init({
timeline: [block_1],
on_finish: function() {
jsPsych.data.displayData();
}
});
</script>
</html>