jsPsych/examples/pause-unpause.html
2017-07-10 14:00:24 -04:00

34 lines
693 B
HTML

<!DOCTYPE html>
<html>
<head>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-text.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>
</head>
<body></body>
<script>
var first = {
type: 'text',
text: 'first trial! experiment will pause for 2s in between trials. press any key.',
post_trial_gap: 0,
on_finish: function(){
jsPsych.pauseExperiment();
setTimeout(jsPsych.resumeExperiment, 2000);
}
}
var second = {
type: 'text',
text: 'second trial!'
}
jsPsych.init({
timeline: [first, second],
on_finish: function(){jsPsych.data.displayData(); }
});
</script>
</html>