mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-12 08:38:11 +00:00
36 lines
1.1 KiB
HTML
36 lines
1.1 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<script src="js/jquery-ui.min.js"></script>
|
|
<script src="../jspsych.js"></script>
|
|
<script src="../plugins/jspsych-similarity.js"></script>
|
|
<link rel="stylesheet" href="css/jquery-ui.css"></link>
|
|
<link rel="stylesheet" href="../css/jspsych.css"></link>
|
|
<style>
|
|
img {
|
|
width: 300px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body><p>If you are seeing this message, then you are probably running this example file offline.
|
|
Loading the audio files offline requires running your browser in a special mode.
|
|
See <a href="https://stackoverflow.com/questions/4819060/allow-google-chrome-to-use-xmlhttprequest-to-load-a-url-from-a-local-file">this Q&A</a>
|
|
for examples of how to get this working with Chrome. Other browsers have similar features that you can find more information on via Google.</p></body>
|
|
<script>
|
|
var block_1 = {
|
|
type: 'similarity',
|
|
stimuli: ['img/happy_face_1.jpg', 'img/sad_face_1.jpg'],
|
|
prompt: '<p class="center-content">How similar are these pictures?</p>'
|
|
}
|
|
|
|
jsPsych.init({
|
|
timeline: [block_1],
|
|
on_finish: function() {
|
|
jsPsych.data.displayData();
|
|
}
|
|
});
|
|
</script>
|
|
|
|
</html>
|