mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-10 11:10:54 +00:00
add example with custom button and page labels#
This commit is contained in:
parent
f795f29cc9
commit
e9d632cfc2
@ -8,17 +8,28 @@
|
|||||||
<body></body>
|
<body></body>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
var trial = {
|
var trial_1 = {
|
||||||
type: 'instructions',
|
type: 'instructions',
|
||||||
pages: ['Welcome to the experiment. Click next to begin.',
|
pages: ['<p>Welcome to the experiment.</p><p>This is the first set of instructions.</p><p>Click next to begin.</p>',
|
||||||
'This is the second page of instructions.',
|
'<p>This is the second page of instructions.</p>',
|
||||||
'This is the final page.'],
|
'<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_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({
|
jsPsych.init({
|
||||||
timeline: [trial],
|
timeline: [trial_1, trial_2],
|
||||||
on_finish: function(){ jsPsych.data.displayData(); }
|
on_finish: function(){ jsPsych.data.displayData(); }
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user