Skip to content

Commit

Permalink
add example with custom button and page labels#
Browse files Browse the repository at this point in the history
  • Loading branch information
becky-gilbert committed Dec 8, 2020
1 parent f795f29 commit e9d632c
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions examples/jspsych-instructions.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,28 @@
<body></body>
<script>

var trial = {
var trial_1 = {
type: 'instructions',
pages: ['Welcome to the experiment. Click next to begin.',
'This is the second page of instructions.',
'This is the final page.'],
pages: ['<p>Welcome to the experiment.</p><p>This is the first set of instructions.</p><p>Click next to begin.</p>',
'<p>This is the second page of instructions.</p>',
'<p>This is the final page.</p>'],
show_clickable_nav: true
}

var trial_2 = {
type: 'instructions',
pages: ['<p>This is a new set of instructions.</p><p>Custom "Page X/Y" and next/previous button labels provide support for different languages.</p>',
'<p>This is the second page of instructions.</p>',
'<p>This is the final page.</p>'],
show_clickable_nav: true,
show_page_number: true
show_page_number: true,
button_label_previous: 'Anterior',
button_label_next: 'Próxima',
page_label: 'Página',
}

jsPsych.init({
timeline: [trial],
timeline: [trial_1, trial_2],
on_finish: function(){ jsPsych.data.displayData(); }
});

Expand Down

0 comments on commit e9d632c

Please sign in to comment.