mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-10 11:10:54 +00:00
33 lines
822 B
HTML
33 lines
822 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<script src="../jspsych.js"></script>
|
|
<script src="../plugins/jspsych-html-keyboard-response.js"></script>
|
|
<script src="../plugins/jspsych-image-keyboard-response.js"></script>
|
|
<link rel="stylesheet" href="../css/jspsych.css">
|
|
</head>
|
|
<body></body>
|
|
<script>
|
|
|
|
var first = {
|
|
type: 'html-keyboard-response',
|
|
stimulus: 'first trial; new trial added when on_finish is called',
|
|
on_finish: function(){
|
|
jsPsych.pauseExperiment();
|
|
jsPsych.addNodeToEndOfTimeline({
|
|
timeline: [{
|
|
type: 'image-keyboard-response',
|
|
stimulus: 'img/happy_face_4.jpg'
|
|
}]
|
|
}, jsPsych.resumeExperiment)
|
|
}
|
|
}
|
|
|
|
jsPsych.init({
|
|
timeline: [first],
|
|
on_finish: function(){jsPsych.data.displayData(); }
|
|
});
|
|
|
|
</script>
|
|
</html>
|