mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-13 09:08:13 +00:00
35 lines
753 B
HTML
35 lines
753 B
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<script src="js/jquery.min.js"></script>
|
|
<script src="../jspsych.js"></script>
|
|
<script src="../plugins/jspsych-text.js"></script>
|
|
<link rel="stylesheet" href="../css/jspsych.css"></link>
|
|
</head>
|
|
<body>
|
|
<div id="jspsych-target"></div>
|
|
</body>
|
|
<script>
|
|
|
|
var first = {
|
|
type: 'text',
|
|
text: 'first trial; new trial added when on_finish is called',
|
|
on_finish: function(){
|
|
jsPsych.addNodeToEndOfTimeline({
|
|
timeline: [{
|
|
type: 'text',
|
|
text: 'second trial!'
|
|
}]
|
|
})
|
|
}
|
|
}
|
|
|
|
jsPsych.init({
|
|
display_element: $('#jspsych-target'),
|
|
timeline: [first],
|
|
on_finish: function(){jsPsych.data.displayData(); }
|
|
});
|
|
|
|
</script>
|
|
</html>
|