forked from jspsych/jsPsych
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjspsych-serial-reaction-time.html
54 lines (46 loc) · 1.16 KB
/
jspsych-serial-reaction-time.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<!DOCTYPE html>
<html>
<head>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-serial-reaction-time.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>
</head>
<script>
var locations = [
[0,0],
[0,1],
[0,2],
[0,3]
];
locations = jsPsych.randomization.shuffle(locations);
var timeline = {
timeline: [
{
type: 'serial-reaction-time',
target: jsPsych.timelineVariable('target1'),
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,
prompt: "<p>Press the key that corresponds to the dark box (use 3, 5, 7, 9)</p>"
}
],
timeline_variables: [
{target1: locations[0], target2: locations[1]},
{target1: locations[2], target2: locations[3]}
],
randomize_order: true,
repetitions: 10
}
jsPsych.init({
timeline: [timeline],
on_finish: function() {
jsPsych.data.displayData();
},
default_iti: 0
});
</script>
</html>