Online Experiments with jsPsych
===============================

Welcome to Online Experiments!

Please start with the first section, "Introduction".

.. toctree::
   :maxdepth: 2

   00 Introduction <00_about>
   01 About the Web <01_web>
   02 An introduction to jsPsych <02_first>
   03 Developer tools and editing <03_pract>
   04 The structure of a jsPsych experiment <04_jspsych>
   05 An introduction to JavaScript <05_javascript>
   06 Getting data from your experiment <06_data>
   07 Allocating participant and condition numbers <07_ppt>
   08 More interesting stimuli <08_stimuli>
   
   Solution 02 <example_code/02_exercise_solution>
   Solution 04 (code in its own file) <example_code/04_separate_file>
   Solution 04 (multiple images) <example_code/multiple_images_simple>
   Solution 05 (all exercises) <example_code/05_solutions>
   Solution 06 (CSV results) <example_code/06_show_csv>
   Repetition <example_code/repetition>
   Timeline variables <example_code/trials_with_variables>
   Factorial design <example_code/factorial>
   Factorial with fixation <example_code/factorial_with_fixation>
   Data saving <example_code/datasaving>
   Data saving line-by-line <example_code/linebyline>
   Use survey-text to add a property <example_code/surveytext>
   PHP code to save data on the server <example_code/record_result>
   Participant ID allocator and condition number <example_code/allocator>
   Multiple images using timeline variables <example_code/multiple_images>
   Multiple images using a loop <example_code/multiple_images_loop>
   Stroop using timeline variables <example_code/stroop_timeline_variables>
   Stroop using a loop <example_code/stroop_loop>
   Stroop using functions <example_code/stroop_functions>
   Code editor hunt <editor_hunt>
   Lists within lists <lists_within_lists>
   For tutors <for_tutors>

* :ref:`search`


.. Lesson plan
   1. The basics
   - what are HTML / CSS / JavaScript
   - what does the server do, vs. what the client does
   - hello world experiment
   - what is a node?
   - what are jsPsych plugins?
   1. Simple experiment
   - RT experiment
   - Advanced: how to show RT as feedback
   1. Some JavaScript
   - walkthrough of a "vanilla" page that does something
     (show clock? pong game? scrolling text?)
   - example of if-elseif-else
   - example of while
   - example of for
   - example of functions
   1. Generating nodes
   - sometimes we want to make lots of similar nodes
   - makes sense to use a loop to construct the nodes
   - we can put it in a function too
   - self-paced reading example
   - 2AFC experiment
   1. More complex example?
