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

47 lines
1.1 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-multi-stim-multi-response.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>
<style>
img {
width: 300px;
}
</style>
</head>
<script>
var trial_1 = {
type: 'multi-stim-multi-response',
stimuli: ['img/happy_face_1.jpg', 'img/sad_face_1.jpg'],
choices: [
[89, 78]
], // Y or N
timing_stim: [1000, -1],
prompt: '<p class="center-content">Is the second person happier than the first? Y or N.</p>'
}
var trial_2 = {
type: 'multi-stim-multi-response',
stimuli: ['img/happy_face_1.jpg'],
choices: [
[89, 78],
[49, 50, 51, 52, 53]
], // Y or N , 1 - 5
timing_stim: [-1],
prompt: '<p class="center-content">Rate the happiness of the person on a scale of 1-5, and press Y or N to indicate if you have seen the face before.</p>'
}
jsPsych.init({
timeline: [trial_1, trial_2],
on_finish: function() {
jsPsych.data.displayData();
}
});
</script>
</html>