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