mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-10 19:20:55 +00:00
36 lines
808 B
HTML
36 lines
808 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>
|
|
<script>
|
|
|
|
var if_trial = {
|
|
type: 'text',
|
|
text: 'The random number generated showed this trial. Press any key to continue.'
|
|
}
|
|
|
|
var if_node = {
|
|
timeline: [if_trial],
|
|
conditional_function: function(){
|
|
console.log('conditional function evaluated');
|
|
return false;
|
|
}
|
|
}
|
|
|
|
var after_if_trial = {
|
|
type: 'text',
|
|
text: 'This is the trial after the conditional. Check the console log to see if conditional evaluated.'
|
|
}
|
|
|
|
jsPsych.init({
|
|
timeline: [if_node, after_if_trial],
|
|
on_finish: function(){jsPsych.data.displayData(); }
|
|
});
|
|
|
|
</script>
|
|
</html>
|