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

37 lines
800 B
HTML

<!doctype html>
<html>
<head>
<script src="js/jquery.min.js"></script>
<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>
<body>
<div id="jspsych-target"></div>
</body>
<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({
display_element: $('#jspsych-target'),
timeline: [block_1],
on_finish: function() {
jsPsych.data.displayData();
}
});
</script>
</html>