mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-10 11:10:54 +00:00
29 lines
677 B
HTML
29 lines
677 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<script src="../jspsych.js"></script>
|
|
<script src="../plugins/jspsych-button-response.js"></script>
|
|
<link rel="stylesheet" href="../css/jspsych.css"></link>
|
|
<style>
|
|
img { width: 300px; }
|
|
</style>
|
|
</head>
|
|
<body></body>
|
|
<script>
|
|
|
|
var br_trial = {
|
|
type: 'button-response',
|
|
stimulus: 'img/happy_face_1.jpg',
|
|
choices: ['Happy', 'Sad'],
|
|
prompt: "<p class='center-content'>What emotion is this person showing?</p>",
|
|
button_html: "<a class='jspsych-btn'>%choice%</a>"
|
|
};
|
|
|
|
jsPsych.init({
|
|
timeline: [br_trial],
|
|
on_finish: function(){jsPsych.data.displayData();}
|
|
});
|
|
|
|
</script>
|
|
</html>
|