diff --git a/README.md b/README.md index 23eaa371..132b823a 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ jsPsych is a JavaScript library for creating behavioral experiments that run in Code Demos ---------- -Demo 1 with the instructions plugin: +[Demo 1](https://github.com/jspsych/jsPsych/tree/master/examples/demos/demo_1.html) with the instructions plugin:
@@ -62,7 +62,7 @@ Demo 1 with the instructions plugin:
-Demo 2 with the image-keyboard-response plugin: +[Demo 2](https://github.com/jspsych/jsPsych/tree/master/examples/demos/demo_2.html) with the image-keyboard-response plugin:
@@ -116,7 +116,7 @@ Demo 2 with the image-keyboard-response plugin:
-And for a slightly longer experiment example, demo 3 with the html-keyboard-response plugin. Also shows data after experiment ends: +And for a slightly longer experiment example, [demo 3](https://github.com/jspsych/jsPsych/tree/master/examples/demos/demo_3.html) with the html-keyboard-response plugin. Also shows data after experiment ends:
@@ -149,10 +149,12 @@ var debrief = { .filter({stim_type: 'congruent'}).select('rt').mean()); var incongruent_rt = Math.round(jsPsych.data.get() .filter({stim_type: 'incongruent'}).select('rt').mean()); - return "

Your average response time for congruent trials"+ - "was "+congruent_rt+"ms.

"+ - "

Your average response time for incongruent trials was"+ - ""incongruent_rt + "ms.

"; + return "

Your average response"+ + "time for congruent trials was "+congruent_rt+ + "ms.

"+ + "

Your average response time for"+ + "incongruent trials was "incongruent_rt + + "ms.

"; } }; diff --git a/examples/demos/demo_2.html b/examples/demos/demo_2.html index 0613ee3e..87b90190 100644 --- a/examples/demos/demo_2.html +++ b/examples/demos/demo_2.html @@ -17,21 +17,21 @@ type: "image-keyboard-response", stimulus: 'img/happy_face_1.jpg', choices: [89, 78], - prompt: '

Is this face happy? Y or N.

' + 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.

' + 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.

', + prompt: '

Is this face happy? Y or N.

', } diff --git a/plugins/jspsych-audio-button-response.js b/plugins/jspsych-audio-button-response.js index f51eaad4..884473ca 100644 --- a/plugins/jspsych-audio-button-response.js +++ b/plugins/jspsych-audio-button-response.js @@ -50,13 +50,13 @@ jsPsych.plugins["audio-button-response"] = (function() { description: '' }, margin_vertical: { - type: jsPsych.parameterType.STRING, + type: jsPsych.plugins.parameterType.STRING, default: '0px', no_function: false, description: '' }, margin_horizontal: { - type: jsPsych.parameterType.STRING, + type: jsPsych.plugins.parameterType.STRING, default: '8px', no_function: false, description: '' @@ -79,13 +79,13 @@ jsPsych.plugins["audio-button-response"] = (function() { plugin.trial = function(display_element, trial) { // default trial parameters - trial.button_html = trial.button_html || ''; - trial.response_ends_trial = (typeof trial.response_ends_trial === 'undefined') ? true : trial.response_ends_trial; - trial.trial_ends_after_audio = (typeof trial.trial_ends_after_audio === 'undefined') ? false : trial.trial_ends_after_audio; - trial.trial_duration = trial.trial_duration || -1; // if -1, then wait for response forever - trial.prompt = (typeof trial.prompt === 'undefined') ? "" : trial.prompt; - trial.margin_vertical = trial.margin_vertical || "0px"; - trial.margin_horizontal = trial.margin_horizontal || "8px"; + // trial.button_html = trial.button_html || ''; + // trial.response_ends_trial = (typeof trial.response_ends_trial === 'undefined') ? true : trial.response_ends_trial; + // trial.trial_ends_after_audio = (typeof trial.trial_ends_after_audio === 'undefined') ? false : trial.trial_ends_after_audio; + // trial.trial_duration = trial.trial_duration || -1; // if -1, then wait for response forever + // trial.prompt = (typeof trial.prompt === 'undefined') ? "" : trial.prompt; + // trial.margin_vertical = trial.margin_vertical || "0px"; + // trial.margin_horizontal = trial.margin_horizontal || "8px"; // setup stimulus var context = jsPsych.pluginAPI.audioContext();