From b77053cda4f1e4bebeb8b532110f7002f48aa8b4 Mon Sep 17 00:00:00 2001 From: kristiyip Date: Wed, 12 Jul 2017 11:56:44 -0400 Subject: [PATCH] Update README.md --- README.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) 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 + }); + + + +```