mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-10 19:20:55 +00:00
update examples
This commit is contained in:
parent
4c8e2a536b
commit
065e74a2c4
28
examples/jspsych-same-different-html.html
Normal file
28
examples/jspsych-same-different-html.html
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<script src="../jspsych.js"></script>
|
||||||
|
<script src="../plugins/jspsych-same-different-html.js"></script>
|
||||||
|
<link rel="stylesheet" href="../css/jspsych.css"></link>
|
||||||
|
</head>
|
||||||
|
<body></body>
|
||||||
|
<script>
|
||||||
|
var trial = {
|
||||||
|
type: 'same-different-html',
|
||||||
|
stimuli: ['<p>Talkative</p>', '<p>Loquacious</p>'],
|
||||||
|
prompt: "<p>Press S if the words mean the same thing. Press D if they mean different things.</p>",
|
||||||
|
same_key: 'S',
|
||||||
|
different_key: 'D',
|
||||||
|
answer: 'same'
|
||||||
|
}
|
||||||
|
|
||||||
|
jsPsych.init({
|
||||||
|
timeline: [trial],
|
||||||
|
on_finish: function() {
|
||||||
|
jsPsych.data.displayData();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</html>
|
@ -24,12 +24,14 @@
|
|||||||
{
|
{
|
||||||
type: 'serial-reaction-time',
|
type: 'serial-reaction-time',
|
||||||
target: jsPsych.timelineVariable('target1'),
|
target: jsPsych.timelineVariable('target1'),
|
||||||
grid_square_size: 80
|
grid_square_size: 80,
|
||||||
|
prompt: "<p>Press the key that corresponds to the dark box (use 3, 5, 7, 9)</p>"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'serial-reaction-time',
|
type: 'serial-reaction-time',
|
||||||
target: jsPsych.timelineVariable('target2'),
|
target: jsPsych.timelineVariable('target2'),
|
||||||
grid_square_size: 80
|
grid_square_size: 80,
|
||||||
|
prompt: "<p>Press the key that corresponds to the dark box (use 3, 5, 7, 9)</p>"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
timeline_variables: [
|
timeline_variables: [
|
||||||
@ -40,11 +42,6 @@
|
|||||||
repetitions: 10
|
repetitions: 10
|
||||||
}
|
}
|
||||||
|
|
||||||
// var instructions = {
|
|
||||||
// type: 'html-keyboard-response',
|
|
||||||
// stimulus: 'Four boxes will be shown on the screen. Press the key associated with the box that is dark. The keys are 3, 5, 7, and 9. Press any key to start.'
|
|
||||||
// }
|
|
||||||
|
|
||||||
jsPsych.init({
|
jsPsych.init({
|
||||||
timeline: [timeline],
|
timeline: [timeline],
|
||||||
on_finish: function() {
|
on_finish: function() {
|
||||||
|
@ -11,10 +11,11 @@
|
|||||||
|
|
||||||
var survey_block = {
|
var survey_block = {
|
||||||
type: 'survey-text',
|
type: 'survey-text',
|
||||||
questions: [{prompt: 'How old are you?',
|
questions: [
|
||||||
value: 'age', rows: 1, columns: 50},
|
{prompt: 'How old are you?', value: 'age', rows: 1, columns: 3},
|
||||||
{prompt: 'Where were you born?',
|
{prompt: 'Where were you born?', value: 'location', rows: 1, columns: 50},
|
||||||
value: 'location', rows: 1, columns: 50}],
|
{prompt: 'Tell me about your day', value: 'How did it start?', rows:10, columns: 50}
|
||||||
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
jsPsych.init({
|
jsPsych.init({
|
||||||
|
Loading…
Reference in New Issue
Block a user