jsPsych/examples/progress-bar.html
2017-07-06 15:31:31 -04:00

83 lines
2.0 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<<<<<<< HEAD:examples/progress-bar.html
=======
>>>>>>> update examples; tweak plugin fixes:examples/jspsych-single-stim.html
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-single-stim.js"></script>
<script src="../plugins/jspsych-text.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>
<style>
img {
width: 300px;
}
</style>
<<<<<<< HEAD:examples/progress-bar.html
=======
</head>
>>>>>>> update examples; tweak plugin fixes:examples/jspsych-single-stim.html
<body></body>
<script>
var trial_1 = {
type: 'single-stim',
stimulus: 'img/happy_face_1.jpg',
choices: [89, 78], // Y or N
prompt: '<p class="center-content">Have you seen this face before? Y or N.</p>'
}
var trial_2 = {
type: 'single-stim',
stimulus: 'img/happy_face_2.jpg',
choices: [89, 78], // Y or N
prompt: '<p class="center-content">Have you seen this face before? Y or N.</p>'
}
var trial_3 = {
type: 'single-stim',
<<<<<<< HEAD:examples/progress-bar.html
stimulus: 'img/happy_face_3.jpg',
choices: [89, 78], // Y or N
prompt: '<p class="center-content">Have you seen this face before? Y or N.</p>'
}
var cnt = 0;
var block_set = {
timeline: [trial_1, trial_2, trial_3],
loop_function: function() {
cnt++;
return cnt < 2;
}
}
var end_screen = {
type: 'text',
text: 'The experiment is over.'
}
jsPsych.init({
timeline: [trial_1, trial_2, trial_3], //block_set, end_screen],
show_progress_bar: true,
=======
choices: jsPsych.NO_KEYS, // Y or N
timing_response: 2000,
prompt: '<p class="center-content">No response allowed. 2s wait.</p>',
stimulus: '<p>:)</p>',
is_html: true
}
jsPsych.init({
timeline: [trial_1, trial_2, trial_3],
>>>>>>> update examples; tweak plugin fixes:examples/jspsych-single-stim.html
on_finish: function() {
jsPsych.data.displayData();
}
});
</script>
</head>
</html>