update examples

This commit is contained in:
Josh de Leeuw 2018-01-03 14:06:20 -05:00
parent 4c8e2a536b
commit 065e74a2c4
4 changed files with 37 additions and 11 deletions

View 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>

View File

@ -24,12 +24,14 @@
{
type: 'serial-reaction-time',
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',
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: [
@ -40,11 +42,6 @@
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({
timeline: [timeline],
on_finish: function() {

View File

@ -11,10 +11,11 @@
var survey_block = {
type: 'survey-text',
questions: [{prompt: 'How old are you?',
value: 'age', rows: 1, columns: 50},
{prompt: 'Where were you born?',
value: 'location', rows: 1, columns: 50}],
questions: [
{prompt: 'How old are you?', value: 'age', rows: 1, columns: 3},
{prompt: 'Where were you born?', value: 'location', rows: 1, columns: 50},
{prompt: 'Tell me about your day', value: 'How did it start?', rows:10, columns: 50}
]
};
jsPsych.init({