Skip to content

Commit

Permalink
fix bugs in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
jodeleeuw committed Jan 15, 2016
1 parent 0e70316 commit f39cf89
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 19 deletions.
14 changes: 5 additions & 9 deletions tests&examples/jspsych-button-response.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,11 @@
button_html: "<a class='jspsych-btn'>%choice%</a>"
};

function start(){
jsPsych.init({
display_element: $('#jspsych-target'),
timeline: [br_trial],
on_finish: function(){jsPsych.data.displayData();}
});
}

jsPsych.preloadImages(['img/happy_face_1.jpg'], start);
jsPsych.init({
display_element: $('#jspsych-target'),
timeline: [br_trial],
on_finish: function(){jsPsych.data.displayData();}
});

</script>
</html>
18 changes: 8 additions & 10 deletions tests&examples/jspsych-multi-stim-multi-response.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
[89, 78]
], // Y or N
timing_stim: [1000, -1],
prompt: '<p class="center-content">Did the face get happier? Y or N.</p>'
prompt: '<p class="center-content">Is the second person happier than the first? Y or N.</p>'
}

var trial_2 = {
Expand All @@ -38,15 +38,13 @@
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>'
}

function start() {
jsPsych.init({
display_element: $('#jspsych-target'),
timeline: [trial_1, trial_2],
on_finish: function() {
jsPsych.data.displayData();
}
});
}
jsPsych.init({
display_element: $('#jspsych-target'),
timeline: [trial_1, trial_2],
on_finish: function() {
jsPsych.data.displayData();
}
});
</script>

</html>

0 comments on commit f39cf89

Please sign in to comment.