diff --git a/README.md b/README.md index f514c13d..638ce64a 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,39 @@ This is an example of the image-keyboard-response plugin:
+```javascript + + + var trial_1 = { + type: "image-keyboard-response", + stimulus: 'img/happy_face_1.jpg', + choices: [89, 78], + prompt: '

Is this face happy? Y or N.

' + } + + var trial_2 = { + type: 'image-keyboard-response', + stimulus: 'img/sad_face_2.jpg', + choices: [89, 78], // Y or N + prompt: '

Is this face happy? Y or N.

' + } + + var trial_3 = { + type: 'image-keyboard-response', + stimulus: 'img/happy_face_2.jpg', + choices: [89, 78], // Y or N + prompt: '

Is this face happy? Y or N.

', + } + + + jsPsych.init({ + timeline: [trial_1, trial_2, trial_3], + default_iti: 250 + }); + + + +```